Magnetic sensor using giant magnetoresistive elements and method for manufacturing the same

ABSTRACT

A magnetic sensor includes a single substrate, a conventional GMR element formed of a spin-valve film including a single-layer-pinned fixed magnetization layer, and a SAF element formed of a synthetic spin-valve film including a plural-layer-pinned fixed magnetization layer. When the spin-valve film intended to act as the conventional GMR element and the synthetic spin-valve film intended to act as the SAF element are subjected to the application of a magnetic field oriented in a single direction at a high temperature, they become giant magnetoresistive elements whose magnetic-field-detecting directions are antiparallel to each other. Since films intended to act as the conventional GMR element and the SAF element can be disposed close to each other, the magnetic sensor which has giant magnetoresistive elements whose magnetic-field-detecting directions are antiparallel to each other can be small.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a divisional of U.S. application Ser. No.11/236,645, filed Sep. 28, 2005, which claims the benefit of JapaneseApplication Nos. 2004-281451, filed on Sep. 28, 2004; 2005-248324, filedAug. 29, 2005; and, 2005-248416, filed Aug. 29, 2005, the disclosures ofwhich are herewith incorporated by reference in their entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a magnetic sensor including giantmagnetoresistive elements and a method for manufacturing the same.

2. Description of the Related Art

A generally known giant magnetoresistive element comprises a spin-valvefilm including a fixed magnetization layer, a free layer whosemagnetization direction is changed in response to an external magneticfield, and a nonmagnetic conductive spacer layer. The fixedmagnetization layer includes a pinned layer and a pinning layer forfixing the magnetization direction of the pinned layer, and the spacerlayer is disposed between the pinned layer and the free layer. Since thepinned layer of the fixed magnetization layer comprises a singleferromagnetic layer (for example, a CoFe layer), the fixed magnetizationlayer is hereinafter referred to as the “single-layer-pinned fixedmagnetization layer” and the spin-valve films including thesingle-layer-pinned fixed magnetization layer is hereinafter referred toas the “single-layer-pinned spin-valve film”, for the sake ofconvenience. A giant magnetoresistive element including thesingle-layer-pinned fixed magnetization layer is hereinafter referred toas a “conventional GMR element”.

The resistance of the conventional GMR element varies depending on theangle formed by the magnetization directions of the pinned layer and thefree layer. Specifically, the resistance of the element varies inresponse to the component of an external magnetic field along themagnetization direction of the pinned layer. Therefore, the elementdetects magnetic fields in the direction along the fixed magnetizationdirection of the pinned layer (more properly, the direction antiparallelto the magnetization direction of the pinned layer). In order to fix themagnetization direction of the pinned layer, magnetic field heattreatment is performed in which, for example, a composite film includinga ferromagnetic layer intended to act as the pinned layer and anantiferromagnetic layer intended to act as the pinning layer isheat-treated at a high temperature while a magnetic field oriented in apredetermined direction is applied to the composite film.

As shown in FIG. 45A, a magnetic sensor using the conventional GMRelement generally includes two conventional GMR elements 101 and 102detecting a magnetic field in a predetermined direction and another twoconventional GMR elements 103 and 104 detecting a magnetic field in thedirection antiparallel to the predetermine direction. These GMR elementsare connected in a full-bridge configuration so as to output thepotential difference V between the points shown in the figure. FIG. 45Bshows the output V of the magnetic sensor shown in FIG. 45A in responseto an external magnetic field H in its magnetic-field-detectingdirection.

This bridge configuration allows the known magnetic sensor to producehigh output even for a small magnetic field. In the known magneticsensor, the temperatures of the GMR elements vary evenly, and theresistances of the GMR elements vary evenly, accordingly. For example,if the temperature of a GMR element increases, the temperatures of theother GMR elements increase evenly and thus the resistances of all theGMR elements varies evenly. Thus, the output V is not easily affected bythe changes in temperature of the GMR elements, and the magnetic sensorcan accurately detect external magnetic fields even if the temperaturesof the GMR elements are varied (as disclosed in, for example, JapaneseUnexamined Patent Application Publication No. 2004-163419).

The magnetization direction of the pinned layer, which determines themagnetic-field-detecting direction, is the same as the direction of amagnetic field applied to the layers which will become the fixedmagnetization layer during the magnetic field heat treatment. In orderto form a plurality of conventional GMR elements detecting magneticfields in antiparallel directions for use in the bridge configuration,antiparallel magnetic fields must be applied to a substrate having aplurality of films which will become the conventional GMR elements.Furthermore, for a magnetic sensor capable of detecting the componentsof a magnetic field along two perpendicular directions (for example,X-axis and Y-axis directions), conventional GMR elements detectingcomponents of a magnetic field in the positive X-axis direction,positive Y-axis direction, negative X-axis direction, and negativeY-axis direction are provided on a very small substrate. Thus, magneticfields oriented in these four directions must be applied to thesubstrate having films which will become the conventional GMR elementsduring the magnetic field heat treatment. However, it is difficult togenerate such magnetic fields oriented in different directions from oneanother in a small area.

The above-cited Japanese Unexamined Patent Application Publication No.2004-163419 has disclosed a method for manufacturing a magnetic sensor,using the following sensor structure and magnet array. Specifically,films which will become four pairs (eight in total) of conventional GMRelements 101 to 108 are formed in the vicinities of the four edges of asubstantially square substrate 100 a, as shown in the plan view in FIG.46.

The magnet array includes rectangular solid permanent magnets arrayed ina tetragonal lattice manner. The permanent magnets are arrayed in such amanner that their end surfaces on one side are present in substantiallythe same plane and the end surfaces of any two adjacent permanentmagnets have magnetic polarities opposite to each other. FIG. 47 is aperspective view of some of permanent magnets 110 in the magnet array.FIG. 47 shows that the upper side of the magnet array and magneticfields generated by the magnets in four directions from an N pole to Spoles.

For performing the magnetic field heat treatment, the substrate 100 ahaving the films which will become the conventional GMR elements isdisposed over the upper side of the magnet array. The magnetic fields inthe four directions generated from the upper side of the magnet arrayare applied, for heat treatment, to the films which will become theconventional GMR elements, as shown in FIG. 48. A magnetic sensor 100shown in FIG. 46 is thus produced.

The conventional GMR elements 101 to 104 of the magnetic sensor 100detect the component of a magnetic field along the X-axis direction. Themagnetization directions of the pinned layers of the conventional GMRelements 101 and 102 are fixed in the negative X-axis direction. Themagnetization directions of the pinned layers of the conventional GMRelements 103 and 104 are fixed in the positive X-axis direction. Ingeneral, the conventional GMR elements 101 to 104 are connected in afull-bridge configuration, as shown in FIG. 45, to form an X-axismagnetic sensor for detecting magnetic fields in the X-axis directions.

The conventional GMR elements 105 to 108 detect the component of amagnetic field along the Y-axis direction. The magnetization directionsof the pinned layers of the conventional GMR elements 105 and 106 arefixed in the positive Y-axis direction. The magnetization directions ofthe pinned layers of the conventional GMR elements 107 and 108 are fixedin the negative Y-axis direction. The conventional GMR elements 105 to108 are connected in the same full-bridge configuration as theconventional GMR elements 101 to 104, and thus form a Y-axis magneticsensor for detecting magnetic fields in the Y-axis directions.

In such perpendicular bidirectional (detecting) magnetic sensor, theconventional GMR elements are disposed in the vicinities of the fouredges of the substrate 100 a, and accordingly it is difficult tominiaturize the magnetic sensor (chip) sufficiently.

In a magnetic sensor in which the conventional GMR elements are arrangedwith long distances, the conventional GMR elements are unevenly deformedby stresses unevenly put thereon if the substrate 100 a or a resincoating or the like covering the substrate 100 a is deformed by heat,external stresses, and so forth. Consequently, the resistances of theconventional GMR elements connected in a bridge configuration areindividually varied, and thus the bridge circuit of the magnetic sensorbecomes imbalance. As a result, the magnetic sensor 100 cannotaccurately detect magnetic fields.

Furthermore, since the distance between the conventional GMR elements inthe magnetic sensor is long, the lengths of wires forming thefull-bridge configuration are increased, and accordingly losses due tothe resistance of the wires are increased.

SUMMARY OF THE INVENTION

The present invention provides a magnetic sensor having a first giantmagnetoresistive element including a single-layer-pinned fixedmagnetization layer and a second giant magnetoresistive elementincluding a plural-layer-pinned fixed magnetization layer on a singlesubstrate.

The first giant magnetoresistive element is defined by asingle-layer-pinned spin-valve film including a single-layer-pinnedfixed magnetization layer, a free layer whose magnetization directionchanges in response to an external magnetic field, and a spacer layermade of a nonmagnetic conductive material. The single-layer-pinned fixedmagnetization layer includes a single ferromagnetic layer and a pinninglayer, and the space layer is disposed between the ferromagnetic layerand the free layer. The magnetization of the ferromagnetic layer isfixed in a first direction (for example, positive X-axis direction) bythe pinning layer, so that the ferromagnetic layer serves as a pinnedlayer.

The second giant magnetoresistive element is defined by aplural-layer-pinned spin-valve film including a plural-layer-pinnedfixed magnetization layer, a free layer whose magnetization directionchanges in response to an external magnetic field, and a spacer layermade of a nonmagnetic conductive material. The plural-layer-pinned fixedmagnetization layer includes a first ferromagnetic layer, an exchangecoupling layer adjoining the first ferromagnetic layer, a secondferromagnetic layer adjoining the exchange coupling layer, and a pinninglayer adjoining the second ferromagnetic layer. The space layer isdisposed between the first ferromagnetic layer and the free layer. Themagnetization direction of the second ferromagnetic layer is fixed bythe pinning layer, and the magnetization direction of the firstferromagnetic layer is fixed in a second direction antiparallel to thefirst direction (for example, negative X-axis direction) by exchangecoupling of the first ferromagnetic layer and the second ferromagneticlayer with the exchange coupling layer therebetween. Thus, the firstferromagnetic layer serves as a pinned layer.

The fixed magnetization direction of the pinned layer of the first giantmagnetoresistive element (first direction) is 180° different from(antiparallel to) the fixed magnetization direction of the pinned layerof the second giant magnetoresistive element (second direction).

The substrate having the single-layer-pinned spin-valve film intended toact as the first giant magnetoresistive element and theplural-layer-pinned spin-valve film intended to act as the second giantmagnetoresistive element is subjected to magnetic field heat treatment.Specifically, a magnetic field oriented in a single direction is appliedto these two films at a high temperature. Consequently, themagnetization of the ferromagnetic layer, intended to act as the pinnedlayer, of the single-layer-pinned spin-valve film and the magnetizationof the second ferromagnetic layer of the plural-layer-pinned spin-valvefilm are fixed in the same direction. At the same time, the firstferromagnetic layer, intended to act as the pinned layer, of theplural-layer-pinned spin-valve film is exchange-coupled with the secondferromagnetic layer with the exchange coupling layer therebetween, sothat the magnetization of the first ferromagnetic layer is fixed in thedirection antiparallel to the magnetization direction of the secondferromagnetic layer. Thus, the magnetization of the pinned layer(ferromagnetic layer) of the first giant magnetoresistive element andthe magnetization of the pinned layer (first ferromagnetic layer) of thesecond giant magnetoresistive element are fixed in antiparalleldirections to each other.

The first giant magnetoresistive element and the second giantmagnetoresistive element each detect magnetic fields in a directionantiparallel to the fixed magnetization direction of their respectivepinned layers; hence, these two elements detect magnetic fields inantiparallel directions (see FIG. 14).

Accordingly, the magnetic sensor of the present invention does notrequire that two giant magnetoresistive elements be disposed with a longinterval in order to apply both a first magnetic field and a secondmagnetic field whose direction is different from a direction of thefirst magnetic field by 180° to the giant magnetoresistive elements,unlike the known magnetic sensor. That is, the magnetic sensor of thepresent invention can be manufactured by applying a magnetic fieldoriented in a single direction to two types of films formed on thesubstrate: one being intended to act as the first giant magnetoresistiveelement and the other being intended to act as the second giantmagnetoresistive element. Therefore, in the magnetic sensor of thepresent invention, the two types of giant magnetoresistive element (thefirst giant magnetoresistive element and the second giantmagnetoresistive element), having 180° differentmagnetic-field-detecting directions can be disposed close to each other.Consequently, the magnetic sensor can be very small.

Preferably, the first giant magnetoresistive element(s) and the secondgiant magnetoresistive element(s) are connected in a bridgeconfiguration to form a circuit producing an output according to apotential at a predetermined point of the circuit that monotonicallyincreases or decreases as the intensity of the component in the firstdirection of a magnetic field applied to the magnetic sensor increases.

The circuit may be a half-bridge circuit or a full-bridge circuit. Thecircuit may include a fixed resistor, in addition to the first giantmagnetoresistive element and the second giant magnetoresistive element.

The magnetic sensor may include two first giant magnetoresistiveelements and two second giant magnetoresistive elements, and theseelements are connected to form a full-bridge circuit.

Specifically, in the full-bridge circuit, an end of one of the two firstgiant magnetoresistive elements is connected to an end of one of the twosecond giant magnetoresistive elements to form a first sub-circuit. Afirst potential is applied to the other end of the first giantmagnetoresistive element of the first sub-circuit, and a secondpotential different from the first potential is applied to the other endof the second giant magnetoresistive element of the first sub-circuit.

In addition, an end of the other first giant magnetoresistive element isconnected to an end of the other second giant magnetoresistive elementto form a second sub-circuit. The first potential is applied to theother end of the second giant magnetoresistive element in the secondsub-circuit, and the second potential is applied to the other end of thefirst giant magnetoresistive element in the second sub-circuit.

In this configuration, the magnetic sensor outputs a difference inpotential between the junction of the first giant magnetoresistiveelement with the second giant magnetoresistive element in the firstsub-circuit and the junction of the first giant magnetoresistive elementwith the second giant magnetoresistive element in the secondsub-circuit.

The full-bridge configuration needs two pairs of giant magnetoresistiveelements, the magnetoresistive elements in each of the pairs havingantiparallel magnetic-field-detecting directions. As explained, sincethe first giant magnetoresistive element and the second giantmagnetoresistive element, which detect magnetic fields in antiparalleldirections, can be readily disposed in a small area on a singlesubstrate, two pairs of the first giant magnetoresistive element and thesecond giant magnetoresistive element can be readily disposed in a smallarea on the substrate. Accordingly, the present invention can achieve adown-sized magnetic sensor having a full-bridge circuit and exhibitingsuperior temperature characteristics.

Since these two types of giant magnetoresistive elements can be disposedin a small area on a single substrate, stress (for example, tensilestress or compressive stress) is almost uniformly and evenly placed(put) on these giant magnetoresistive elements, even if the substrate orresin coating or the like covering the substrate and other layers isdeformed by heat or external stress. Thus, the resistances of the giantmagnetoresistive elements evenly increase or decrease, and thepossibility of losing the balance of the full-bridge circuit can bereduced. Accordingly, the magnetic sensor can accurately detect magneticfields.

The magnetic sensor may further include a third giant magnetoresistiveelement is defined by the single-layer-pinned spin-valve film formed onthe substrate, and a fourth giant magnetoresistive element is defined bythe plural-layer-pinned spin-valve film formed on the substrate. Themagnetization of the ferromagnetic layer in the third giantmagnetoresistive element is fixed in a third direction perpendicular tothe first direction, and the magnetization of the first ferromagneticlayer in the fourth giant magnetoresistive element is fixed in a fourthdirection antiparallel to the third direction.

This structure allows the magnetic sensor to detect the components(magnetism) of a magnetic field along two perpendicular directions. Thistype of magnetic sensor may be referred to as a “perpendicularbidirectional magnetic sensor”. Since the third giant magnetoresistiveelement and the fourth giant magnetoresistive element can be disposed ina small area on the substrate, as in the case of the first giantmagnetoresistive element and the second giant magnetoresistive element,the perpendicular bidirectional magnetic sensor can be small.

In the perpendicular bidirectional magnetic sensor, the first giantmagnetoresistive element and the second giant magnetoresistive elementare connected in a bridge configuration to form a circuit producing afirst output according to a potential at a predetermined point of thecircuit that monotonically increases or decreases as the intensity of acomponent in the first direction of a magnetic field applied to themagnetic sensor increases. Also, the third giant magnetoresistiveelement and the fourth giant magnetoresistive element are connected in abridge configuration to form a circuit producing a second outputaccording to a potential at a predetermined point of the circuit thatmonotonically increases or decreases as the intensity of a component inthe third direction of the magnetic field applied to the magnetic sensorincreases.

These bridge configurations may leads to half-bridge circuits orfull-bridge circuits. These circuits may each include a fixed resistor,in addition to the first and second giant magnetoresistive elements, orthe third and fourth giant magnetoresistive elements.

The perpendicular bidirectional magnetic sensor may include two firstgiant magnetoresistive elements, two second giant magnetoresistiveelement, two third giant magnetoresistive elements, and two fourth giantmagnetoresistive elements. The two first giant magnetoresistive elementsand the two second giant magnetoresistive element are connected in afull-bridge configuration including a first sub-circuit and a secondsub-circuit. The two third giant magnetoresistive elements and the twofourth giant magnetoresistive elements are connected in anotherfull-bridge configuration including a third sub-circuit and a fourthsub-circuit.

This structure can achieve a perpendicular bidirectional magnetic sensorincluding two full-bridge circuits and exhibiting superior temperaturecharacteristics. In addition, the two third giant magnetoresistiveelements and the two fourth giant magnetoresistive elements, as well asthe two first giant magnetoresistive elements and the two second giantmagnetoresistive element, can be disposed in a small area on thesubstrate. Accordingly, the perpendicular bidirectional magnetic sensorcan be small.

Since the giant magnetoresistive elements forming a bridge circuit canbe disposed in a small area on a single substrate, stress (for example,tensile stress or compressive stress) is almost uniformly placed onthese giant magnetoresistive elements, even if the substrate or a resincoating or the like covering the substrate and other layers is deformed.The resistances of these giant magnetoresistive elements thereforeevenly increase or decrease, and the possibility of losing the balanceof the full-bridge circuit can be reduced. Thus, the perpendicularbidirectional magnetic sensor can accurately detect each of thecomponents of a magnetic field along two perpendicular directions. Inthis magnetic sensor, a first potential and a second potential differentfrom the first potential may be respectively applied to the ends of oneof the full-bridge circuits, and a third potential and a fourthpotential different from the third potential may be respectively appliedto the ends of the other full-bridge circuit. In this instance, thefirst potential and the third potential may be the same, and the secondpotential and the fourth potential may be the same.

The magnetic sensor of the present invention may include four giantmagnetoresistive elements formed on the substrate, each including(defined by) the single-layer-pinned spin-valve film, and four giantmagnetoresistive elements formed on the substrate, each including(defined by) the plural-layer-pinned spin-valve film. The four giantmagnetoresistive elements of the single-layer-pinned spin-valve film areconnected in a full-bridge configuration to form a circuit used fordetecting magnetic fields in a predetermined direction. The four giantmagnetoresistive elements of the plural-layer-pinned spin-valve film areconnected in a full-bridge configuration to form another circuit usedfor detecting magnetic fields in the predetermined direction. By use ofoutputs from these two circuits, the magnetic sensor can produce outputsaffected as little as possible by stress placed on the elements.

To facilitate understanding, this form will be described in detail belowwith reference to FIGS. 30 to 34. Specifically, in the magnetic sensorin this form, the number of the first giant magnetoresistive element istwo (51G, 52G), and the number of the second giant magnetoresistiveelement is two (61S, 62S). The two first giant magnetoresistive elementsand the two second giant magnetoresistive elements are disposed close toeach other in a first region.

The magnetic sensor further includes two fifth giant magnetoresistiveelements (53G, 54G) each including (defined by) the single-layer-pinnedspin-valve film on the substrate, and two sixth giant magnetoresistiveelements (63S, 64S) each including (defined by) the plural-layer-pinnedspin-valve film on the substrate. The magnetization of the ferromagneticlayer in each fifth giant magnetoresistive element is fixed in thesecond direction. The magnetization of the first ferromagnetic layer ineach sixth giant magnetoresistive element is fixed in the firstdirection. The two fifth giant magnetoresistive elements and the twosixth giant magnetoresistive elements are disposed close to each otherin a second region apart from the first region.

As shown in FIG. 32A, in the magnetic sensor, an end of one element(51G) of the two first giant magnetoresistive elements is connected toan end of one element (53G) of the two fifth giant magnetoresistiveelements to form a fifth sub-circuit, and an end of the other firstgiant magnetoresistive element (52G) is connected to an end of the otherfifth giant magnetoresistive element (54G) in series to form a sixthsub-circuit. A first potential (+V) is applied to the other end of thefirst giant magnetoresistive element (51G) of the fifth sub-circuit andthe other end of the fifth giant magnetoresistive element (54G) of thesixth sub-circuit, and a second potential (GND) different from the firstpotential is applied to the other end of the fifth giantmagnetoresistive element (53G) of the fifth sub-circuit and the otherend of the first giant magnetoresistive element (52G) of the sixthsub-circuit. The thus formed circuit outputs the potential differenceVoxConv between the junction (Q10) of the first giant magnetoresistiveelement (51G) with fifth giant magnetoresistive element (53G) in thefifth sub-circuit and the junction (Q20) of the first giantmagnetoresistive element (52G) with the fifth giant magnetoresistiveelement (54G) in the sixth sub-circuit. This potential differenceVoxConv is defined as a conventional GMR element output.

Also, as shown in FIG. 33A, an end of one element (61S) of the twosecond giant magnetoresistive elements is connected to an end of oneelement (63S) of the two sixth giant magnetoresistive elements to form aseventh sub-circuit, and an end of the other second giantmagnetoresistive element (62S) is connected to an end of the other sixthgiant magnetoresistive element (64S) in series to form an eighthsub-circuit. A third potential (which may be the same as the firstpotential +V) is applied to the other end of the second giantmagnetoresistive element (61S) of the seventh sub-circuit and the otherend of the sixth giant magnetoresistive element (64S) of the eighthsub-circuit, and a fourth potential (which may be the same as the secondpotential, GND) different from the third potential is applied to theother end of the sixth giant magnetoresistive element (63S) of theseventh sub-circuit and the other end of the second giantmagnetoresistive element (62S) of the eighth sub-circuit. The thusformed circuit outputs the potential difference VoxSAF between thejunction (Q30) of the second giant magnetoresistive element (61S) withthe sixth giant magnetoresistive element (63S) in the seventhsub-circuit and the junction (Q40) of the second giant magnetoresistiveelement (62S) with the sixth giant magnetoresistive element (64S) in theeighth sub-circuit. This potential difference VoxSAF is defined as a SAFelement output.

As shown in FIG. 31, the magnetic sensor produces an output according tothe conventional GMR element output VoxConv and the SAF element outputVoxSAF. The output according to the conventional GMR element output andthe SAF element output may be the potential difference between theconventional GMR element output and the SAF element output, the ratio ofthese two outputs, or other values.

For the sake of convenience of the description, it is assumed that thepositive direction of the directions in which a magnetic field is to bedetected is antiparallel to the first direction, that the conventionalGMR element output VoxConv is a difference obtained by subtracting thepotential at the junction Q20 from the potential at the junction Q10,and that the SAF element output VoxSAF is a difference obtained bysubtracting the potential at the junction Q40 from the potential at thejunction Q30. In addition, it is assumed that the magnetic sensoroutputs a difference obtained by subtracting the conventional GMRelement output VoxConv from the SAF element output VoxSAF, as shown inFIG. 31.

In this instance, as the intensity of a magnetic field to be detectedincreases, the conventional GMR element output VoxConv decreases asshown in FIG. 32B and the SAF element output VoxSAF increases as shownin FIG. 33B. Consequently, the output Vox of the magnetic sensorincreases as the intensity of the magnetic field increases, as shown inFIG. 34.

In the magnetic sensor, a stress (for example, tensile stress orcompressive stress) is uniformly placed on the first giantmagnetoresistive elements (51G, 52G) and second giant magnetoresistiveelement (61S, 62S) in the first region. Also, a stress (for example,tensile stress or compressive stress) is uniformly placed on the fifthgiant magnetoresistive elements (53G, 54G) and sixth giantmagnetoresistive element (63S, 64S) in the second region.

If a compressive stress is placed on the elements in the first regionand a tensile stress is placed on the elements in the second regionwhile the magnetic field to be detected is not changed, the resistancesof the elements (51G, 52G, 61S, 62S) in the first region reduce evenlyand the resistances of the elements (53G, 54G, 63S, 64S) in the secondregion increase evenly. Thus, the potentials at the junctions Q10 andQ30 increase and the potentials at the junctions Q20 and Q40 decrease.

Consequently, the SAF element output VoxSAF and the conventional GMRelement output VoxConv increase together, and thus the output of themagnetic sensor hardly varies.

If a tensile stress is placed on the elements in the first region and acompressive stress is placed on the elements in the second region, theresistances of the elements (51G, 52G, 61S, 62S) in the first regionincrease evenly and the resistances of the elements (53G, 54G, 63S, 64S)in the second region reduce evenly. Thus, the potentials at thejunctions Q10 and Q30 decrease and the potentials at the junctions Q20and Q40 increase.

Consequently, the SAF element output VoxSAF and the conventional GMRelement output VoxConv decrease together, and thus the output of themagnetic sensor hardly varies.

Furthermore, if a tensile stress is placed on all the elements, theresistances of the elements in the first region and the second regionall increase evenly. Thus, the potentials at the junctions from Q10 toQ40 hardly vary. Consequently, the SAF element output VoxSAF and theconventional GMR element output VoxConv hardly vary, and thus the outputof the magnetic sensor, that is, the difference of those two outputs,hardly varies. If a compressive stress is placed on all the elements,the potentials at the junctions from Q10 to Q40 hardly vary, and thusoutput of the magnetic sensor hardly varies.

As described above with the exemplification, the magnetic sensor canproduce a substantially constant output even if the stress placed oneach of the elements is different each other, as long as the externalmagnetic field remains unchanged. Thus, the magnetic sensor canaccurately detect magnetic fields.

The magnetic sensor of the present invention may include a plurality offirst giant magnetoresistive elements (each having thesingle-layer-pinned fixed magnetization layer) and the same number ofthe second giant magnetoresistive elements (each having theplural-layer-pinned fixed magnetization layer) as the number of thefirst giant magnetoresistive elements. The first giant magnetoresistiveelements and the second giant magnetoresistive elements are alternatelyarranged in parallel with each other in a predetermined direction of thesubstrate. The first giant magnetoresistive elements are connected inseries to form a giant magnetoresistive element, and the second giantmagnetoresistive elements are connected in series to form another giantmagnetoresistive element.

As described above, since the magnetic sensor of the present inventioncan be small, the difference among stresses placed on the giantmagnetoresistive elements on the substrate can be small. But, it isinferred that the stress produced by deformation of the substrate or aresin coating and placed on the elements on the substrate graduallyvaries along the surface of the substrate. Thus, as the arrangementdescribed above, by alternately arranging the first giantmagnetoresistive elements and the second giant magnetoresistive elementsalong a predetermined direction on the substrate, and connecting thefirst giant magnetoresistive elements in serried to form a giantmagnetoresistive element (first element), and connecting the secondgiant magnetoresistive elements in series to form another giantmagnetoresistive element (second element), stresses of similarmagnitudes (having similar averages) can be placed on the first elementand the second element. Accordingly, the variations in resistanceresulting from the stresses on the first element and the second elementbecome close to each other. Therefore, by connecting the first and thesecond element in a bridge configuration to form a circuit, the outputof the magnetic sensor is less affected by stress.

The magnetic sensor of the present invention may include four of saidfirst giant magnetoresistive elements and four of said second giantmagnetoresistive elements. Two of the four first giant magnetoresistiveelements lie adjacent to each other and form a first group, and theother two of the four first giant magnetoresistive elements lie adjacentto each other and form a second group. Two of the four second giantmagnetoresistive elements lie adjacent to each other and form a thirdgroup, and the other two of the four second giant magnetoresistiveelements lie adjacent to each other and form a fourth group. The firstto fourth groups are arranged in parallel in a predetermined directionon the substrate in an order of the first group, the third group, thesecond group, and the fourth group, or in an order of the third group,the first group, the fourth group, and the second group.

Two of the first giant magnetoresistive elements which are unadjacenteach other are connected to form an element (third element) composed ofthe first giant magnetoresistive elements and the rest two of the firstgiant magnetoresistive elements which are unadjacent each other areconnected to form an element (fourth element) composed of the firstgiant magnetoresistive elements. In other words, two pairs of unadjacentfirst giant magnetoresistive elements are respectively connected todefine two elements (third element, fourth element) composed of thefirst giant magnetoresistive elements.

Further, Two of the second giant magnetoresistive elements which areunadjacent each other are connected to form an element (third element)composed of the second giant magnetoresistive elements and the rest twoof the second giant magnetoresistive elements which are unadjacent eachother are connected to form an element (fourth element) composed of thesecond giant magnetoresistive elements. In other words, two pairs ofunadjacent second giant magnetoresistive elements are respectivelyconnected to define two elements (fifth element, sixth element) composedof the second giant magnetoresistive elements.

This structure can allow the third to sixth elements to receive stresseshaving still closer magnitudes. Thus, the variations in resistance ofthe third to sixth elements due to stress can be close. Accordingly, byconnecting these third to sixth elements in a full-bridge configurationto form a magnetic sensor, the magnetic sensor can produce outputs stillless affected by stress on the elements.

According to another aspect of the present invention, a method formanufacturing the magnetic sensor is provided. The method includes thefilm forming step of forming a film intended to act as the first giantmagnetoresistive element and a film intended to act as the second giantmagnetoresistive element on the substrate, and the magnetic field heattreatment step of applying a magnetic field oriented in a singledirection to the films at a high-temperature (under a high-temperatureatmosphere) to fix the magnetization direction of each pinned layer.

According to the magnetic field heat treatment, the magnetizationdirection of the pinned layer in the first giant magnetoresistiveelement and the magnetization direction of the pinned layer in thesecond giant magnetoresistive element are easily fixed so that thesemagnetization directions are antiparallel to each other. Thus, two giantmagnetoresistive elements whose magnetic-field-detecting directions areantiparallel to each other can easily be manufactured on a singlesubstrate.

Preferably, the magnetic field heat treatment step uses a magnetic fieldgenerated from a magnet array including a plurality of substantiallyrectangular solid permanent magnets, each having a substantially squareend surface perpendicular to a central axis of each of the permanentmagnet. The permanent magnets are arrayed at small intervals in such amanner that the barycenters of the end surfaces correspond to latticepoints of a tetragonal lattice, and that a polarity of any one of thepermanent magnets is opposite to a polarity of the other adjacentpermanent magnets spaced by the shortest route (distance).

Preferably, the film forming step includes the sub steps of forming onthe substrate a first composite layer which will become one of the firstgiant magnetoresistive element and the second giant magnetoresistiveelement (first film forming step), removing an unnecessary region of thefirst composite layer (first unnecessary region removing step), coatingthe first composite layer with an insulating layer after removing theunnecessary region (forming an insulating layer step), forming a secondcomposite layer which will become the other film of the first giantmagnetoresistive element and the second giant magnetoresistive elementon the substrate and on the insulating layer (second film forming step);and removing an unnecessary region of the second composite layer (secondunnecessary region removing step).

With the method above, a magnetic sensor having the first giantmagnetoresistive element and the second giant magnetoresistive elementon the single substrate is easily manufactured.

Alternatively, the film forming step may include the sub steps offorming (depositing) layers intended to act as the pinning layer, thesecond ferromagnetic layer, and the exchange coupling layer of thesecond giant magnetoresistive element in this order on the substrate toform a first pre-composite layer (first pre-composite layer formingstep), removing completely the layer intended to act as the exchangecoupling layer of the first pre-composite layer from a region in whichthe first giant magnetoresistive element is to be formed withoutremoving the first pre-composite layer in a region that is to have thesecond giant magnetoresistive element (first exchange coupling layerremoving step), and forming (depositing) a ferromagnetic layer havingthe same composition as the second ferromagnetic layer and layersintended to act as the spacer layer and the free layer of the firstgiant magnetoresistive element and the second giant magnetoresistiveelement, in this order, over the entire upper surface of the layersafter the step of removing the layer intended to act as the exchangecoupling layer (first additional layers forming step).

By the method above, a composite layer intended to act as the secondgiant magnetoresistive element including the first ferromagnetic layerand the second ferromagnetic layer with the exchange coupling layertherebetween is provided on one side, and another composite layerintended to act as the first giant magnetoresistive element includingthe ferromagnetic layer formed by two cycles of deposition in the fixedmagnetization layer (or the pinned layer) is provided on the other side.Thus, a magnetic sensor having the first giant magnetoresistive elementand the second giant magnetoresistive element on the single substrate iseasily manufactured.

Alternatively, the film forming step may include the sub steps offorming (depositing) a layer intended to act as the free layer of thefirst and second giant magnetoresistive elements, a layer intended toact as the spacer layer of the first and second giant magnetoresistiveelements, a layer intended to act as the first ferromagnetic layer ofthe second giant magnetoresistive element, a layer intended to act asthe exchange coupling layer of the second giant magnetoresistiveelement, in this order, on the substrate to form a second pre-compositelayer (second pre-composite layer forming step), removing the layercompletely intended to act as the exchange coupling layer of the secondpre-composite layer from a region on which the first giantmagnetoresistive element is formed without removing the secondpre-composite layer in a region that is to have the second giantmagnetoresistive element (second exchange coupling layer removing step),and forming (depositing) a ferromagnetic layer having the samecomposition as the first ferromagnetic layer and a layer intended to actas the pinning layer of the first and the second giant magnetoresistiveelements, in this order, over the entire upper surface of the layersafter the step of removing the layer intended to act as the exchangecoupling layer (second additional layers forming step).

By the method above, a composite layer intended to act as the secondgiant magnetoresistive element including the first ferromagnetic layerand the second ferromagnetic layer with the exchange coupling layertherebetween is provided on one side, and another composite layerintended to act as the first giant magnetoresistive element includingthe ferromagnetic layer formed by two cycles of deposition in the fixedmagnetization layer (or the pinned layer) is provided on the other side.Thus, a magnetic sensor having the first giant magnetoresistive elementand the second giant magnetoresistive element on the single substrate iseasily manufactured.

According to another aspect of the present invention, a magnetic sensoris provided in which the first giant magnetoresistive element includingthe single-layer-pinned fixed magnetization layer and the second giantmagnetoresistive element including the plural-layer-pinned fixedmagnetization layer overlap each other (lie one over the other) on asingle substrate.

Specifically, the first giant magnetoresistive element and the secondgiant magnetoresistive element are formed so as to overlap each other(lie one over the other) at a same position of the main surface of thesubstrate. Also, the fixed magnetization of the pinned layer of thefirst giant magnetoresistive element is oriented in the direction (i.e.,the first direction) which is antiparallel to the direction (i.e., thesecond direction) of the fixed magnetization of the pinned layer of thesecond giant magnetoresistive element.

Accordingly, the magnetic sensor also does not require that two giantmagnetoresistive elements be disposed with a long interval in order toapply both a first magnetic field and a second magnetic field whosedirection is different from a direction of the first magnetic field by180° to the giant magnetoresistive elements, unlike the known magneticsensor. That is, the magnetic sensor can be manufactured by applying amagnetic field oriented in a single direction to two types of filmsformed on the substrate in such a manner that those two types of filmsoverlap each other: one being intended to act as the first giantmagnetoresistive element and the other being intended to act as thesecond giant magnetoresistive element. Therefore, in the magnetic sensorof the present invention, the two types of giant magnetoresistiveelement (i.e., the first giant magnetoresistive element and the secondgiant magnetoresistive element), having 180° differentmagnetic-field-detecting directions can be disposed close. Consequently,the magnetic sensor can be very small.

By disposing the first giant magnetoresistive element and the secondgiant magnetoresistive element so as to lie one over the other, stress(tensile stress or compressive stress) is substantially uniformly placedon these giant magnetoresistive elements, even if the substrate or resincoating covering the substrate is deformed by heat or external stressand the like. As a result, even when such stresses are placed on bothelements, the resistances of the elements vary evenly (the resistancesof the elements change by almost the same amount). Thus, by adopting aconfiguration (for example, a bridge circuit), in which the differencein resistances of the both elements is extracted, for the magneticsensor, the resulting magnetic sensor may not be affected by suchstresses.

The magnetic sensor may further includes a third giant magnetoresistiveelement defined by the single-layer-pinned spin-valve film disposed onthe substrate, and a fourth giant magnetoresistive element defined bythe plural-layer-pinned spin-valve film which is disposed on thesubstrate so as to lap over or under the third giant magnetoresistiveelement. The magnetization of the ferromagnetic layer in the third giantmagnetoresistive element is fixed in a third direction perpendicular tothe first direction, and the magnetization of the first ferromagneticlayer in the fourth giant magnetoresistive element is fixed in a fourthdirection antiparallel to the third direction.

This structure allows the magnetic sensor to detect the components(magnetism) of a magnetic field along two perpendicular directions;hence, a perpendicular bidirectional magnetic sensor is achieved. Sincethe third giant magnetoresistive element and the fourth giantmagnetoresistive element can be disposed in a small area on thesubstrate, as in the case of the first giant magnetoresistive elementand the second giant magnetoresistive element, the perpendicularbidirectional magnetic sensor can be small.

According to another aspect of the present invention, a method formanufacturing the magnetic sensor described above is also provided.Specifically, the method includes the film forming step of forming afilm intended to act as the first giant magnetoresistive element and afilm intended to act as the second giant magnetoresistive element on thesubstrate such that one of the films overlap the other film, and themagnetic field heat treatment step of applying a magnetic field orientedin a single direction to the films at a high-temperature to fix themagnetization direction of each pinned layer.

According to the magnetic field heat treatment, the magnetizationdirection of the pinned layer in the first giant magnetoresistiveelement and the magnetization direction of the pinned layer in thesecond giant magnetoresistive element are easily fixed so that thesemagnetization directions are antiparallel to each other. Thus, two giantmagnetoresistive elements whose magnetic-field-detecting directions areantiparallel to each other can easily be manufactured on a singlesubstrate.

Preferably, the magnetic field heat treatment step uses a magnetic fieldgenerated from a magnet array including a plurality of substantiallyrectangular solid permanent magnets, each having substantially squareend surfaces perpendicular to a central axis of the permanent magnet.The permanent magnets are arrayed at small intervals in such a mannerthat the barycenters of the end surfaces correspond to lattice points ofa tetragonal lattice, and that a polarity of any one of the permanentmagnets is opposite to a polarity of the other adjacent permanentmagnets spaced by the shortest route (distance).

Preferably, the film forming step includes the sub steps of forming onthe substrate a first composite layer which will become one of a filmintended to act as the first giant magnetoresistive element and a filmintended to act as the second giant magnetoresistive element (first filmforming step), removing an unnecessary region (i.e., an unnecessaryportion) of the first composite layer (first unnecessary region removingstep), coating the first composite layer with an insulating layer afterremoving the unnecessary region (insulating layer forming step), forminga second composite layer which will become a file intended to act as theother film of the first giant magnetoresistive element and the secondgiant magnetoresistive element on the insulating layer (second filmforming step), and removing an unnecessary region (i.e., an unnecessaryportion) of the second composite layer.

With the method above, the magnetic sensor having the first giantmagnetoresistive element and the second giant magnetoresistive elementon a single substrate is easily manufactured.

According to another aspect of the present invention, a magnetic sensorof the present invention may include four giant magnetoresistiveelements formed on the substrate each of which includes thesingle-layer-pinned spin-valve film, and four giant magnetoresistiveelements formed on the substrate each of which includes theplural-layer-pinned spin-valve film, wherein the plural-layer-pinnedspin-valve films respectively lap (lie) over or under thesingle-layer-pinned spin-valve films. The four giant magnetoresistiveelements having the single-layer-pinned spin-valve films are connectedin a full-bridge configuration to form a circuit using for detecting amagnetic field in a predetermined direction. The four giantmagnetoresistive elements having the plural-layer-pinned spin-valvefilms are connected in a full-bridge configuration to form anothercircuit used for detecting the magnetic field in the predetermineddirection. The magnetic sensor utilizes outputs from these two circuitsto detect the magnetic field in the predetermined direction. Themagnetic sensor thus configured can produce outputs affected as littleas possible by stress placed on the elements.

To facilitate understanding, this form will be described in detail belowwith reference to FIGS. 69 to 75A and 75B. Specifically, in the magneticsensor in this form, the first giant magnetoresistive element (251G) andthe second giant magnetoresistive element (261S) overlap over or underthe first giant magnetoresistive element (251G) define an eleventhelement group, and the eleventh element group is disposed in an eleventhregion on the substrate. Note that, in FIG. 69, two elements in eachsolid line circle (for example, the first giant magnetoresistive element251G and the second giant magnetoresistive element 261S) overlap eachother (i.e., lie one over the other) in the direction perpendicular tothe main surface of the substrate 210 a (i.e., Z-axis direction).

The magnetic sensor further includes a third giant magnetoresistiveelement (252G) defined by the single-layer-pinned spin-valve film, and afourth giant magnetoresistive element (262S) defined by theplural-layer-pinned spin-valve film. The fourth giant magnetoresistiveelement (262S) laps over or under the third giant magnetoresistiveelement (252G) on the substrate. The magnetization of the ferromagneticlayer of the third giant magnetoresistive element is fixed in the firstdirection, and the magnetization of the first ferromagnetic layer of thefourth giant magnetoresistive element is fixed in the second direction.The third giant magnetoresistive element and the fourth giantmagnetoresistive element define a twelfth element group, and the twelfthelement group is disposed close to the eleventh element group in theeleventh region.

The magnetic sensor still further includes a fifth giantmagnetoresistive element (253G) defined by the single-layer-pinnedspin-valve film and in which the magnetization of the ferromagneticlayer is fixed in the second direction, a sixth giant magnetoresistiveelement (263S) defined by the plural-layer-pinned spin-valve film whichlaps over or under the fifth giant magnetoresistive element on thesubstrate and in which the magnetization of the first ferromagneticlayer is fixed in the first direction, a seventh giant magnetoresistiveelement (254G) defined by the single-layer-pinned spin-valve film and inwhich the magnetization of the ferromagnetic layer is fixed in thesecond direction, and an eighth giant magnetoresistive element (246S)defined by the plural-layer-pinned spin-valve film which laps over orunder the seventh giant magnetoresistive element on the substrate and inwhich the magnetization of the first ferromagnetic layer is fixed in thefirst direction. The fifth giant magnetoresistive element (253G) and thesixth giant magnetoresistive element (263S) define a thirteenth elementgroup and the thirteenth element group is disposed in a twelfth regionon the substrate, apart from the eleventh region. The seven giantmagnetoresistive element (254G) and the eighth giant magnetoresistiveelement (264S) define a fourteenth element group and the fourteenthelement group is disposed close to the thirteenth element group in thetwelfth region.

As shown in FIG. 71A, in the magnet sensor, an end of the first giantmagnetoresistive element (251G) is connected to an end of the fifthgiant magnetoresistive element (253G) to form a first sub-circuit, andan end of the third giant magnetoresistive element (252G) is connectedto an end of the seventh giant magnetoresistive element (254G) to form asecond sub-circuit. A first potential (+V) is applied to the other endof the first giant magnetoresistive element (251G) and the other end ofthe seventh giant magnetoresistive element (254G), and a secondpotential (GND) different from the first potential is applied to theother end of the third giant magnetoresistive element (252G) and theother end of the fifth giant magnetoresistive element (253G). The magnetsensor is configured so as to output the potential difference VoxConvbetween the junction (Q210) of the first giant magnetoresistive element(251G) with the fifth giant magnetoresistive element (253G) and thejunction (Q220) of the third giant magnetoresistive element (252G) withthe seventh giant magnetoresistive element (254G). This potentialdifference VoxConv is defined as a conventional GMR element output.

Also, as shown in FIG. 72A, an end of the second giant magnetoresistiveelement (261S) is connected to an end of the sixth giantmagnetoresistive element (263S) to form a third sub-circuit, and an endof the fourth giant magnetoresistive element (262S) is connected to anend of the eighth giant magnetoresistive element (264S) to form a fourthsub-circuit. A third potential (may be the same as the first potential+V) is applied to the other end of the second giant magnetoresistiveelement (261S) and the other end of the eighth giant magnetoresistiveelement (264S), and a fourth potential (may be the same as the secondpotential GND) different from the third potential is applied to theother end of the fourth giant magnetoresistive element (262S) and theother end of the sixth giant magnetoresistive element (263S). The magnetsensor is configured so as to output the potential difference VoxSAFbetween the junction (Q230) of the second giant magnetoresistive element(261S) with the sixth giant magnetoresistive element (263S) and thejunction (Q240) of the fourth giant magnetoresistive element (262S) withthe eighth giant magnetoresistive element (264S). This potentialdifference VoxSAF is defined as a SAF element output.

Further, as shown in FIG. 70, the magnetic sensor produces an output Voxaccording to the conventional GMR element output VoxConv and the SAFelement output VoxSAF. The output according to the conventional GMRelement output and the SAF element output may be the potentialdifference between the conventional GMR element output and the SAFelement output, the ratio of these two outputs, or other values usingthese two outputs.

This magnetic sensor functions in the same manner as the foregoingmagnetic sensor described with reference to FIGS. 30 to 34. For the sakeof convenience of the description, it is assumed that the positivedirection of the directions in which a magnetic field is to be detectedis antiparallel to the first direction, that the conventional GMRelement output VoxConv is a difference obtained by subtracting thepotential at the junction Q220 from the potential at the junction Q210,and that the SAF element output VoxSAF is a difference obtained bysubtracting the potential at the junction Q240 from the potential at thejunction Q230. In addition, it is assumed that the magnetic sensoroutputs a difference obtained by subtracting the conventional GMRelement output VoxConv from the SAF element output VoxSAF.

In this instance, as the intensity of a magnetic field to be detectedincreases, the conventional GMR element output VoxConv decreases asshown in FIG. 71B and the SAF element output VoxSAF increases as shownin FIG. 72B. Consequently, the output Vox of the magnetic sensorincreases as the intensity of the magnetic field increases, as shown inFIG. 73.

In the magnetic sensor, a stress (for example, tensile stress orcompressive stress) is uniformly placed on the giant magnetoresistiveelements (251G, 252G, 261S, 262S) in the eleventh region. Also, a stressis uniformly placed on the giant magnetoresistive elements (253G, 254G,263S, 264S) in the twelfth region.

If a compressive stress is placed on the elements in the eleventh regionand a tensile stress is placed on the elements in the twelfth regionwhile the magnetic field to be detected is not changed, the resistancesof the elements (251G, 252G, 261S, 262S) in the eleventh region reduceevenly and the resistances of the elements (253G, 254G, 263S, 264S) inthe twelfth region increase evenly. Thus, the potentials at thejunctions Q210 and Q230 increase and the potentials at the junctionsQ220 and Q240 decrease.

Consequently, the SAF element output VoxSAF and the conventional GMRelement output VoxConv increase together, and thus the output of themagnetic sensor hardly varies.

If a tensile stress is placed on the elements in the eleventh region anda compressive stress is placed on the elements in the twelfth region,the resistances of the elements (251G, 252G, 261S, 262S) in the eleventhregion increase evenly and the resistances of the elements (253G, 254G,263S, 264S) in the twelfth region reduce evenly. Thus, the potentials atthe junctions Q210 and Q230 decrease and the potentials at the junctionsQ220 and Q240 increase.

Consequently, the SAF element output VoxSAF and the conventional GMRelement output VoxConv decrease together, and thus the output of themagnetic sensor hardly varies.

Furthermore, if a tensile stress is placed on all the elements, theresistances of the elements in the eleventh region and the twelfthregion all increase evenly. Thus, the potentials at the junctions fromQ210 to Q240 hardly vary. Consequently, the SAF element output VoxSAFand the conventional GMR element output VoxConv hardly vary, and thusthe output of the magnetic sensor, that is, the difference of those twooutputs, hardly varies. If a compressive stress is placed on all theelements, the potentials at the junctions from Q210 to Q240 also hardlyvary, and thus output of the magnetic sensor hardly varies.

As described above with the exemplification, the magnetic sensor canproduce a substantially constant output even if the stress placed oneach of the elements is different each other, as long as the externalmagnetic field remains unchanged. Thus, the magnetic sensor canaccurately detect magnetic fields.

According to another aspect of the present invention, a magnetic sensormay include a first giant magnetoresistive element (first giantmagnetoresistive element film) including the single-layer-pinned fixedmagnetization layer, a second giant magnetoresistive element (secondgiant magnetoresistive element film) including the plural-layer-pinnedfixed magnetization layer, and a plurality of bias magnet films forapplying bias magnetic fields to the giant magnetoresistive elements, ona single substrate.

In the sensor, the first giant magnetoresistive element and the secondgiant magnetoresistive element are disposed close to each other on thesubstrate. The fixed magnetization direction (i.e., the first direction)of the pinned layer of the first giant magnetoresistive element isantiparallel to the fixed magnetization direction (i.e., the seconddirection) of the pinned layer of the second giant magnetoresistiveelement. That is, the first direction is different from the seconddirection by 180°.

The magnetic sensor also does not require that two giantmagnetoresistive elements be disposed with a long interval in order toapply both a first magnetic field and a second magnetic field whosedirection is different from a direction of the first magnetic field by180° to the giant magnetoresistive elements, unlike the known magneticsensor. That is, the magnetic sensor can be manufactured by applying amagnetic field oriented in a single direction to two types of filmsformed on the substrate: one being intended to act as the first giantmagnetoresistive element and the other being intended to act as thesecond giant magnetoresistive element. Therefore, in the magneticsensor, the two types of giant magnetoresistive element (i.e., the firstgiant magnetoresistive element and the second giant magnetoresistiveelement), having 180° different magnetic-field-detecting directions canbe disposed close. Consequently, the magnetic sensor can be very small.

The plurality of bias magnet films include a first bias magnet filmdisposed on the substrate so as to be in contact with an end of thefirst giant magnetoresistive element, a second bias magnet film disposedon the substrate so as to be in contact with an end of the second giantmagnetoresistive element, and a third bias magnet film disposed on thesubstrate so as to be in contact with both the other end of the firstgiant magnetoresistive element and the other end of the second giantmagnetoresistive element. The first bias magnet film applies to thefirst giant magnetoresistive element a bias magnetic field oriented in athird direction substantially perpendicular to the first direction. Thesecond bias magnet film applies to the second giant magnetoresistiveelement a bias magnetic field oriented in the third direction. The thirdbias magnet film applies a bias magnetic field oriented in the thirddirection to both the first giant magnetoresistive element and thesecond giant magnetoresistive element.

Each of the bias magnet films generates a bias magnetic field fororienting the magnetization of the free layers in the directionsubstantially perpendicular to the magnetization direction of thecorresponding fixed magnetization layer when no external magnetic fieldis applied to the first or the second giant magnetoresistive element.The presence of the bias magnet film reduces the hysteresis of themagnetic sensor for an external magnetic field. In general, the biasmagnet films are disposed at both ends of the first giantmagnetoresistive element and both ends of the second giantmagnetoresistive element.

In order to miniaturize the magnetic sensor, it is preferable that thefirst giant magnetoresistive element be disposed close to the secondgiant magnetoresistive element as much as possible. Accordingly, in themagnetic sensor according to one aspect of the present invention, acommon bias magnet film (third bias magnet film) is provided so as to bein contact with both an end of the first giant magnetoresistive elementand an end of the second giant magnetoresistive element. The common biasmagnet film is substituted for at least two bias magnet films of theconventional magnetic sensor, and allows the first giantmagnetoresistive element and the second giant magnetoresistive elementto be disposed very close to each other. Thus, the size of the magneticsensor can be small. Furthermore, since two elements in contact with thethird bias magnet film are electrically coupled with each other by thethird (common) bias magnet film, it is unnecessary to connect these twoelements via wires. Therefore, the giant magnetoresistive elements in abridge configuration can be provided more inexpensively.

In the magnetic sensor having such common bias magnet film, the firstgiant magnetoresistive element may be configured in such a manner that aplurality of the single-layer-pinned spin-valve films (the first giantmagnetoresistive element films) are connected in series, and the secondgiant magnetoresistive element may be configured in such a manner that aplurality of the plural-layer-pinned spin-valve films (the second giantmagnetoresistive element films) are connected in series. Also, in themagnetic sensor having such common bias magnet film, the magnetic sensormay include a pair of the first giant magnetoresistive elements (or thefirst giant magnetoresistive element films) and a pair of the secondgiant magnetoresistive elements (or the second giant magnetoresistiveelement films), these being connected to form a full-bridge circuit.

Specifically, the magnetic sensor having such common bias magnet filmmay be a magnetic sensor having a full-bridge circuit comprising a firstsub-circuit and a second sub-circuit. The first sub-circuit isconfigured in such a manner that a first potential is applied to an endof the first giant magnetoresistive element, the other end of the firstgiant magnetoresistive element is connected to an end of the secondgiant magnetoresistive element, and a second potential is applied to theother end of the second giant magnetoresistive element, by, for example,being grounded. The second sub-circuit is configured in such a mannerthat the first potential is applied to an end of another second giantmagnetoresistive element, the other end of the second giantmagnetoresistive element is connected to an end of another first giantmagnetoresistive element, and a second potential is applied to the otherend of the first giant magnetoresistive element. The magnetic sensorthus formed is configured so as to output the potential differencebetween the junction of the first giant magnetoresistive element withthe second giant magnetoresistive element in the first sub-circuit andthe junction of the first giant magnetoresistive element with the secondgiant magnetoresistive element in the second sub-circuit. Alternatively,the magnetic sensor may be a half-bridge circuit sensor having a singlefirst giant magnetoresistive element and a single second giantmagnetoresistive element, wherein these elements being connected in ahalf-bridge configuration, to output a potential at the junction of thefirst giant magnetoresistive element with the second giantmagnetoresistive element.

In those structures, the first giant magnetoresistive element and thesecond giant magnetoresistive element may each have a narrowstrip-shaped portion extending from the third bias magnet film in thesame direction substantially perpendicular to the first direction.Alternatively, the first giant magnetoresistive element and the secondgiant magnetoresistive element may each have a narrow strip-shapedportion, and the narrow strip-shaped portions extend in a line in adirection substantially perpendicular to the first direction, with thethird bias magnet film disposed therebetween. In either case, two biasmagnet films generally used in the conventional magnetic sensor arereplaced with the single bias magnet film (the common bias film or thirdbias magnet film), and accordingly the magnetic sensor can be smaller.

Preferably, the magnetic sensor further includes an insulating layer,and the first giant magnetoresistive element and the second giantmagnetoresistive element partially intersect each other when viewed fromabove, with the insulating layer therebetween.

In the magnetic sensor thus configured, the first giant magnetoresistiveelement and the second giant magnetoresistive element intersect eachother (when viewed from above), and consequently, the first giantmagnetoresistive element and the second giant magnetoresistive elementcan be closer to each other.

It is also preferable that the magnetic sensor further includes aninsulating layer, and each of the first bias magnet film, the secondbias magnet film, and the third bias magnet film has a trapezoidalsection so that each of the bias magnet films has slants with respect tothe surface of the substrate, and an upper surface parallel to the uppersurface of the substrate. An end of the first giant magnetoresistiveelement is in contact with the slant of the first bias magnet film andthe other end is in contact with the slant of the third bias magnetfilm. A portion between the ends of the first giant magnetoresistiveelement abuts (lies) on the upper surface of the substrate. The firstgiant magnetoresistive element is covered with the insulating layer. Theupper surface of the insulating layer is flush with the upper surfacesof the first to third bias magnet films. An end of the second giantmagnetoresistive element is in contact with the upper surface of thesecond bias magnet film and the other end is in contact with the uppersurface of the third bias magnet film. A portion between the ends of thesecond giant magnetoresistive element abuts (lies) on the upper surfaceof the insulating layer.

Alternatively, an end of the second giant magnetoresistive element is incontact with the slant of the second bias magnet film and the other endis in contact with the slant of the third bias magnet film. A portionbetween the ends of the second giant magnetoresistive element abuts(lies) on the upper surface of the substrate. The second giantmagnetoresistive element is covered with the insulating layer. The uppersurface of the insulating layer is flush with the upper surfaces of thefirst to third bias magnet films. An end of the first giantmagnetoresistive element is in contact with the upper surface of thefirst bias magnet film and the other end is in contact with the uppersurface of the third bias magnet film. A portion between the ends of thefirst giant magnetoresistive element abuts (lies) on the upper surfaceof the insulating layer.

In order to apply a bias magnetic field to the giant magnetoresistiveelements from the bias magnet films, the giant magnetoresistive elementsand their respective bias magnet films should be magnetically coupledwith each other. In the above-described structure, the giantmagnetoresistive elements are in contact with their respective biasmagnet films, so that bias magnetic fields are easily applied to thegiant magnetoresistive elements.

According to another aspect of the present invention, another method formanufacturing the magnetic sensor is provided. The method includes thesteps of; preparing a single substrate (substrate preparation step);forming films intended to act as the first to third bias magnet films onthe substrate (bias magnet films forming step); forming a first filmintended to act as one of the first giant magnetoresistive element andthe second giant magnetoresistive element on the upper surface of thesubstrate and the upper surfaces of the first to third bias magnet films(first film forming step); forming an insulating layer so as to coverthe upper surfaces of the films intended to act as the bias magnet filmsand the first film (insulating layer forming step); planarizing theupper surfaces of the insulating layer, the films intended to act as thebias magnet films, and the first film by removing the insulating layer,the films intended to act as the bias magnet films, and the first filmso that the upper surfaces of the films intended to act as the biasmagnet film are exposed (planarizing step); forming a second filmintended to act as the other one of the first giant magnetoresistiveelement and the second giant magnetoresistive element on the planarizedsurface (second film forming step); and performing a magnetic field heattreatment by applying a magnetic field oriented in a single direction tothe first film and the second film at a high temperature, thereby fixingthe magnetization directions of the pinned layers (magnetic field heattreatment step or thermal annealing step).

By this method above, bias magnet films are first formed, subsequently afilm intended to act as one of the first giant magnetoresistive elementand the second giant magnetoresistive element is formed (including thestep of patterning the film into a predetermined shape), and then theinsulating layer is deposited over the entire surface.

Subsequently, the insulating layer is partially removed so that theupper surfaces of the bias magnet films are exposed and are flush withthe surface of the insulating layer. Then, another film intended to actas the other giant magnetoresistive element is formed (including thestep of patterning the film into a predetermined shape). Finally,magnetic field heat treatment is performed to fix the magnetizationdirections of the pinned layers.

In the method above, by the magnetic field heat treatment, themagnetization direction of the pinned layer in the first giantmagnetoresistive element and the magnetization direction of the pinnedlayer in the second giant magnetoresistive element are easily fixed sothat these magnetization directions are antiparallel to each other.Thus, two giant magnetoresistive elements whose magnetic-field-detectingdirections are antiparallel can be easily manufactured and disposedclose to each other.

In addition, since the first giant magnetoresistive element iselectrically isolated from the second giant magnetoresistive element bythe insulating layer, the magnetic sensor having these two elementsdisposed close to each other can be easily manufactured. Furthermore,the first and the second giant magnetoresistive elements can be disposedin such a manner that one of the elements lap over or under the other(lie one over the other), or intersect each other in the verticaldirection. Thus, the resulting magnetic sensor can be still smaller.

For the structure above, preferably, the films intended to act as thefirst to third bias magnet films are each formed so as to have a slantwith respect to the surface of the substrate.

Since each bias magnet film has a slant, ends of the first film can beeasily brought into contact with the slant of the bias magnet films. Inaddition, since the second film formation is performed with the uppersurface of each bias magnet film being exposed, the second film can beeasily brought into contact with the upper surface of the bias magnetfilm.

Preferably, the magnetic field heat treatment step uses a magnetic fieldgenerated from a magnet array including a plurality of substantiallyrectangular solid permanent magnets having substantially square endsurfaces perpendicular to a central axis of one of the permanentmagnets. The permanent magnets are arrayed at small intervals in such amanner that the barycenters of the end surfaces correspond to latticepoints of a tetragonal lattice, and that a polarity of any one of thepermanent magnets is opposite to a polarity of the other adjacentpermanent magnets spaced by the shortest route (i.e., each permanentmagnet has an opposite polarity to the polarity of its adjacentpermanent magnets).

Thus, at least two giant magnetoresistive elements having 180° differentmagnetic-field-detecting directions can be easily and efficiently formedin a small area on a single substrate.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a plan view of a magnetic sensor (N type) according to a firstembodiment of the present invention;

FIG. 2 is an enlarged plan view of a conventional GMR element shown inFIG. 1;

FIG. 3 is a schematic sectional view of the conventional GMR elementtaken along line I-I in FIG. 2;

FIG. 4A is a schematic representation of the structure of a conventionalGMR element shown in FIG. 1;

FIG. 4B is a conceptual perspective view of a conventional GMR elementshown in FIG. 1;

FIG. 4C is a graph showing the changes in resistance of a conventionalGMR element shown in FIG. 1 in response to an external magnetic field;

FIG. 5A is a schematic representation of the structure of a SAF elementshown in FIG. 1;

FIG. 5B is a conceptual perspective view of a SAF element shown in FIG.1;

FIG. 5C is a graph showing the changes in resistance of a SAF elementshown in FIG. 1 in response to an external magnetic field;

FIG. 6A is an equivalent circuit of an X-axis magnetic sensor includedin the magnetic sensor shown in FIG. 1;

FIG. 6B is a graph showing the changes in output of the X-axis magneticsensor in response to the component in the positive X-axis direction ofan external magnetic field;

FIG. 7A is an equivalent circuit of a Y-axis magnetic sensor included inthe magnetic sensor shown FIG. 1;

FIG. 7B is a graph showing the changes in output of the Y-axis magneticsensor in response to the component in the positive Y-axis direction ofan external magnetic field;

FIG. 8 is a fragmentary plan view of a wafer (substrate) used formanufacturing the magnetic sensor shown in FIG. 1;

FIG. 9 is a plan view of a magnet array used for fixing themagnetizations of pinned layers of the magnetic sensor shown in FIG. 1;

FIG. 10 is a sectional view of the magnet array taken along line II-IIin FIG. 9;

FIG. 11 is a perspective view of five of the permanent magnets in themagnet array shown in FIG. 9;

FIG. 12 is a fragmentary plan view of a magnet array and a wafer usedfor fixing the magnetization directions of the pinned layers of theconventional GMR elements and SAF elements in the magnetic sensor shownin FIG. 1;

FIG. 13 is a representation of the relationships, each between themagnetic field direction in magnetic field heat treatment and theresulting characteristics of a conventional GMR element;

FIG. 14 is a representation of the relationships, each between themagnetic field direction in magnetic field heat treatment and theresulting characteristics of a conventional GMR element or a SAFelement;

FIG. 15 is a plan view of a magnetic sensor (S type) according to thefirst embodiment of the present invention;

FIG. 16A is a manufacturing process view of a step for forming filmsintended to act as the conventional GMR elements and the SAF elements ona substrate, according to a first method for manufacturing the magneticsensor shown in FIG. 1;

FIG. 16B is a manufacturing process view of a step following the stepshown in FIG. 16A;

FIG. 16C is a manufacturing process view of a step following the stepshown in FIG. 16B;

FIG. 17A is a manufacturing process view of a step following the stepshown in FIG. 16C;

FIG. 17B is a manufacturing process view of a step following the stepshown in FIG. 17A;

FIG. 17C is a manufacturing process view of a step following the stepshown in FIG. 17B;

FIG. 18A is a manufacturing process view of a step following the stepshown in FIG. 17C;

FIG. 18B is a manufacturing process view of a step following the stepshown in FIG. 18A;

FIG. 18C is a manufacturing process view of a step following the stepshown in FIG. 18B;

FIG. 19A is a manufacturing process view of a step following the stepshown in FIG. 18C;

FIG. 19B is a manufacturing process view of a step following the stepshown in FIG. 19A;

FIG. 19C is a manufacturing process view of a step following the stepshown in FIG. 19B;

FIG. 20A is a manufacturing process view of a step following the stepshown in FIG. 19C;

FIG. 20B is a manufacturing process view of a step following the stepshown in FIG. 20A;

FIG. 20C is a manufacturing process view of a step following the stepshown in FIG. 20B;

FIG. 21A is a manufacturing process view of a step following the stepshown in FIG. 20C;

FIG. 21B is a manufacturing process view of a step following the stepshown in FIG. 21A;

FIG. 22A is a manufacturing process view of a step for forming filmsintended to act as the conventional GMR elements and the SAF elements ona substrate, according to a second method for manufacturing the magneticsensor shown in FIG. 1;

FIG. 22B is a manufacturing process view of a step following the stepshown in FIG. 22A;

FIG. 22C is a manufacturing process view of a step following the stepshown in FIG. 22B;

FIG. 23A is a manufacturing process view of a step following the stepshown in FIG. 22C;

FIG. 23B is a manufacturing process view of a step following the stepshown in FIG. 23A;

FIG. 24A is a manufacturing process view of a step following the stepshown in FIG. 23B;

FIG. 24B is an enlarged view of a first SAF composite layer shown inFIG. 24A.

FIG. 25A is a manufacturing process view of a step following the stepshown in FIG. 24A;

FIG. 25B is an enlarged view of an end of a resist layer R5 and itsvicinity shown in FIG. 25A;

FIG. 26A is a manufacturing process view of a step following the stepshown in FIG. 25A;

FIG. 26B is an enlarged view of an end of a resist layer R5 formed bythe step shown in FIG. 26A;

FIG. 26C is a manufacturing process view of a step following the stepshown in FIG. 26A;

FIG. 27A is a manufacturing process view of a step following the stepshown in FIG. 26C;

FIG. 27B is an enlarged view of a Ru layer and layers in its vicinityformed by the step shown in FIG. 27A;

FIG. 28A is a manufacturing process view of a step following the stepshown in FIG. 27A;

FIG. 28B is a manufacturing process view of a step following the stepshown in FIG. 28A;

FIG. 28C is a manufacturing process view of a step following the stepshown in FIG. 28B;

FIG. 29 is a flow diagram showing steps for forming films intended toact as conventional GMR elements and SAF elements, according to a thirdmethod for manufacturing the magnetic sensor shown in FIG. 1;

FIG. 30 is a plan view of a magnetic sensor according to a secondembodiment of the present invention;

FIG. 31 is a block diagram of a circuit of an X-axis magnetic sensorincluded in the magnetic sensor shown in FIG. 30;

FIG. 32A is a schematic diagram of an equivalent circuit of a firstX-axis magnetic sensor included in the magnetic sensor shown in FIG. 30;

FIG. 32B is a graph showing the changes in output of the first X-axismagnetic sensor in response to the component in the positive X-axisdirection of an external magnetic field;

FIG. 33A is a schematic diagram of an equivalent circuit of a secondX-axis magnetic sensor included in the magnetic sensor shown in FIG. 30;

FIG. 33B is a graph showing the changes in output of the second X-axismagnetic sensor in response to the component in the positive X-axisdirection of an external magnetic field;

FIG. 34 is a graph showing the changes in output of the X-axis magneticsensor of the magnetic sensor shown in FIG. 30 in response to thecomponent in the positive X-axis direction of an external magneticfield;

FIG. 35 is a block diagram of a circuit of a Y-axis magnetic sensorincluded in the magnetic sensor shown in FIG. 30;

FIG. 36A is a schematic diagram of an equivalent circuit of a firstY-axis magnetic sensor included in the magnetic sensor shown in FIG. 30;

FIG. 36B is a graph showing the changes in output of the first Y-axismagnetic sensor in response to the component in the positive Y-axisdirection of an external magnetic field;

FIG. 37A is a schematic diagram of an equivalent circuit of a secondY-axis magnetic sensor included in the magnetic sensor shown in FIG. 30;

FIG. 37B is a graph showing the changes in output of the second Y-axismagnetic sensor shown in FIG. 30 in response to the component in thepositive Y-axis direction of an external magnetic field;

FIG. 38 is a graph showing the changes in output of the Y-axis magneticsensor of the magnetic sensor shown in FIG. 30 in response to thecomponent in the positive Y-axis direction of an external magneticfield;

FIG. 39 is a plan view of an element group of a magnetic sensoraccording to a third embodiment of the present invention;

FIG. 40 is a plan view of another element group of the magnetic sensoraccording to the third embodiment;

FIG. 41 is a plan view of a magnetic sensor according to a fourthembodiment of the present invention;

FIG. 42 is a plan view of an X-axis magnetic detecting element group ofthe magnetic sensor shown in FIG. 41;

FIG. 43 is a plan view of a Y-axis magnetic detecting element group ofthe magnetic sensor shown in FIG. 41;

FIG. 44A is a schematic diagram of an equivalent circuit of a magneticsensor according to a modification of the present invention;

FIG. 44B is a schematic diagram of an equivalent circuit of a magneticsensor according to another modification of the present invention;

FIG. 45A is a schematic diagram of an equivalent circuit of a knownmagnetic sensor;

FIG. 45B is a graph showing the changes in output of the known magneticsensor in response to an external magnetic field;

FIG. 46 is a plan view of the known magnetic sensor;

FIG. 47 is a perspective view of five of the permanent magnets in amagnet array used for fixing the magnetization direction of a fixedmagnetization layer of the known magnetic sensor;

FIG. 48 is a plan view of the positional relationship between the magnetarray shown in FIG. 47 and a wafer when the magnetization direction ofthe fixed magnetization layer is fixed;

FIG. 49 is a plan view of a magnetic sensor (N type) according to afifth embodiment of the present invention;

FIG. 50 is an enlarged plan view of a conventional GMR element shown inFIG. 49;

FIG. 51 is an enlarged plan view of a SAF element shown in FIG. 49;

FIG. 52 is an enlarged plan view of a sixth element group (including aconventional GMR element and a SAF element) shown in FIG. 49;

FIG. 53 is a schematic sectional view of the sixth element group takenalong line LIII-LIII in FIG. 52;

FIG. 54A is a schematic diagram of an equivalent circuit of an X-axismagnetic sensor included in the magnetic sensor shown in FIG. 49;

FIG. 54B is a graph showing the changes in output of the X-axis magneticsensor shown in FIG. 40 in response to the component in the positiveX-axis direction of an external magnetic field;

FIG. 55A is a schematic diagram of an equivalent circuit of a Y-axismagnetic sensor included in the magnetic sensor shown in FIG. 49;

FIG. 55B is a graph showing the changes in output of the Y-axis magneticsensor shown in FIG. 49 in response to the component in the positiveY-axis direction of an external magnetic field;

FIG. 56 is a fragmentary plan view of a wafer (substrate) used formanufacturing the magnetic sensor shown in FIG. 49;

FIG. 57 is a perspective view of five of the permanent magnets in themagnet array shown in FIG. 9;

FIG. 58 is a fragmentary plan view of a magnet array and a wafer usedfor fixing the magnetization directions of the pinned layers of theconventional GMR elements and SAF elements of the magnetic sensor shownin FIG. 49;

FIG. 59 is a representation of the relationships, each between themagnetic field direction in magnetic field heat treatment and theresulting characteristics of a conventional GMR element;

FIG. 60 is a plan view of a magnetic sensor (S type) according to afifth embodiment of the present invention;

FIG. 61A is a manufacturing process view of a step for forming filmsintended to act as the conventional GMR elements and the SAF elements ona substrate, according to a method for manufacturing the magnetic sensorshown in FIG. 49;

FIG. 61B is a manufacturing process view of a step following the stepshown in FIG. 61A;

FIG. 61C is a manufacturing process view of a step following the stepshown in FIG. 61B;

FIG. 62A is a manufacturing process view of a step following the stepshown in FIG. 61C;

FIG. 62B is a manufacturing process view of a step following the stepshown in FIG. 62A;

FIG. 62C is a manufacturing process view of a step following the stepshown in FIG. 62B;

FIG. 63A is a manufacturing process view of a step following the stepshown in FIG. 62C;

FIG. 63B is a manufacturing process view of a step following the stepshown in FIG. 63A;

FIG. 63C is a manufacturing process view of a step following the stepshown in FIG. 63B;

FIG. 64A is a manufacturing process view of a step following the stepshown in FIG. 63C;

FIG. 64B is a manufacturing process view of a step following the stepshown in FIG. 64A;

FIG. 64C is a manufacturing process view of a step following the stepshown in FIG. 64B;

FIG. 65A is a manufacturing process view of a step following the stepshown in FIG. 64C;

FIG. 65B is a manufacturing process view of a step following the stepshown in FIG. 65A;

FIG. 65C is a manufacturing process view of a step following the stepshown in FIG. 65B;

FIG. 66A is a manufacturing process view of a step following the stepshown in FIG. 65C;

FIG. 66B is a manufacturing process view of a step following the stepshown in FIG. 66A;

FIG. 66C is a manufacturing process view of a step following the stepshown in FIG. 66B;

FIG. 67A is a manufacturing process view of a step following the stepshown in FIG. 66C;

FIG. 67B is a manufacturing process view of a step following the stepshown in FIG. 67A;

FIG. 67C is a manufacturing process view of a step following the stepshown in FIG. 67B;

FIG. 68 is an enlarged plan view of a sixth element group of a magneticsensor according to a sixth embodiment of the present invention;

FIG. 69 is a plan view of a magnetic sensor according to a seventhembodiment of the present invention;

FIG. 70 is a block diagram of a circuit of an X-axis magnetic sensorincluded in the magnetic sensor shown in FIG. 69;

FIG. 71A is a schematic diagram of an equivalent circuit of a firstX-axis magnetic sensor included in the magnetic sensor shown in FIG. 69;

FIG. 71B is a graph showing the changes in output of the first X-axismagnetic sensor in response to the component in the positive X-axisdirection of an external magnetic field;

FIG. 72A is a schematic diagram of an equivalent circuit of a secondX-axis magnetic sensor included in the magnetic sensor shown in FIG. 69;

FIG. 72B is a graph showing the changes in output of the second X-axismagnetic sensor shown in FIG. 69 in response to the component in thepositive X-axis direction of an external magnetic field;

FIG. 73 is a graph showing the changes in output of the X-axis magneticsensor of the magnetic sensor shown in FIG. 69 in response to thecomponent in the positive X-axis direction of an external magneticfield;

FIG. 74 is a block diagram of a circuit of a Y-axis magnetic sensorincluded in the magnetic sensor shown in FIG. 69;

FIG. 75A is a schematic diagram of an equivalent circuit of a firstY-axis magnetic sensor included in the magnetic sensor shown in FIG. 69;

FIG. 75B is a graph showing the changes in output of the first Y-axismagnetic sensor in response to the component in the positive Y-axisdirection of an external magnetic field;

FIG. 76A is a schematic diagram of an equivalent circuit of a secondY-axis magnetic sensor included in the magnetic sensor shown in FIG. 69;

FIG. 76B is a graph showing the changes in output of the second Y-axismagnetic sensor shown in FIG. 69 in response to the component in thepositive Y-axis direction of an external magnetic field;

FIG. 77 is a graph showing the changes in output of the Y-axis magneticsensor of the magnetic sensor shown in FIG. 69 in response to thecomponent in the positive Y-axis direction of an external magneticfield;

FIG. 78A is a plan view of a magnetic sensor according to an eighthembodiment of the present invention;

FIG. 78B is a schematic diagram of an equivalent circuit of the magneticsensor shown in FIG. 78A;

FIG. 79 is a schematic diagram of an equivalent circuit of a magneticsensor according to another modification of the present invention;

FIG. 80 is a plan view of a magnetic sensor (N type) according to aninth embodiment of the present invention;

FIG. 81 is an enlarged plan view of an X-axis magnetic sensor of themagnetic sensor shown in FIG. 80;

FIG. 82 is a sectional view of the X-axis magnetic sensor taken alongline I-I in FIG. 81;

FIG. 83 is a sectional view of the X-axis magnetic sensor taken alongline II-II in FIG. 81;

FIG. 84A is a schematic diagram of an equivalent circuit of the X-axismagnetic sensor shown in FIG. 81;

FIG. 84B is a graph showing the changes in output of the X-axis magneticsensor shown in FIG. 81 in response to the component in the positiveX-axis direction of an external magnetic field;

FIG. 85 is a manufacturing process view of a step of a method formanufacturing the magnetic sensor shown in FIG. 80;

FIG. 86 is a manufacturing process view of a step of a method formanufacturing the magnetic sensor shown in FIG. 80;

FIG. 87 is a manufacturing process view of a step of a method formanufacturing the magnetic sensor shown in FIG. 80;

FIG. 88 is a fragmentary plan view of a wafer (substrate) used formanufacturing the magnetic sensor shown in FIG. 80;

FIG. 89 is a perspective view of five of the permanent magnets in themagnet array shown in FIG. 9;

FIG. 90 is a fragmentary plan view of a magnet array and a wafer usedfor fixing the magnetization directions of the pinned layers of theconventional GMR elements and SAF elements of the magnetic sensor shownin FIG. 80;

FIG. 91 is a representation of the relationships between the directionof a magnetic field and the characteristics of a conventional GMRelement and a SAF element when they are subjected to heat treatment inthe magnetic field;

FIG. 92 is a plan view of an X-axis magnetic sensor included in amagnetic sensor according to a tenth embodiment of the presentinvention;

FIG. 93 is a plan view of an X-axis magnetic sensor included in amagnetic sensor according to an eleventh embodiment;

FIG. 94 is a sectional view of the X-axis magnetic sensor taken alongline IV-IV in FIG. 93; and

FIG. 95 is a schematic diagram of an equivalent circuit of the X-axismagnetic sensor shown in FIG. 93;

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Embodiments of the magnetic sensor of the present invention will now bedescribed with reference to the drawings.

First Embodiment Structure of Magnetic Sensor

FIG. 1 is a plan view of a magnetic sensor 10 according to a firstembodiment of the present invention. The magnetic sensor 10 includes asingle substrate (monolithic chip) 10 a and a total of eight giantmagnetoresistive elements 11 to 14 and 21 to 24. The magnetic sensor 10is referred to as an “N-type magnetic sensor 10” for the sake ofconvenience.

The substrate 10 a is a thin silicon plate made of silicon. In planview, the substrate 10 a has a rectangular (substantially square) shapedefined by four edges extending along mutually orthogonal X-axis andY-axis. The substrate 10 a has a small thickness along the Z-axisorthogonal to the X- and Y-axes.

Giant magnetoresistive elements 11, 12, 21, and 22 are conventional GMRelements. The other giant magnetoresistive elements 13, 14, 23, and 24are elements (hereinafter referred to as “SAF elements” for the sake ofconvenience, described in detail later) having a synthetic spin-valvefilm including a plural-layer-pinned fixed magnetization layer.

In the present embodiment, the giant magnetoresistive elements 11, 12,13, and 14 may be referred to as a first, a second, a third, and afourth X-axis magnetic detecting element, respectively; the giantmagnetoresistive elements 21, 22, 23, and 24 may be referred to as afirst, a second, a third, and a fourth Y-axis magnetic detectingelement, respectively. The conventional GMR elements 11 and 12 may bereferred to as first giant magnetoresistive elements; the SAF elements13 and 14 may be referred to as second giant magnetoresistive elements;the conventional GMR elements 21 and 22 may be referred to as thirdgiant magnetoresistive elements; the SAF elements 23 and 24 may bereferred to as fourth giant magnetoresistive elements.

The conventional GMR elements 11, 12, 21, and 22 have substantially thesame structure, except for their positions on the substrate 10 a. Thefollowing description illustrates the structure of the conventional GMRelement 11 as a representative example.

FIG. 2 is an enlarged plan view of the conventional GMR element 11 andFIG. 3 is a schematic sectional view of the conventional GMR element 11taken along line I-I in FIG. 2. As shown in FIGS. 2 and 3, theconventional GMR element 11 includes a plurality (six in this case) ofnarrow strip-shaped portions 11 a 1 to 11 a 6, a plurality (seven inthis case) of bias magnet films 11 b 1 to 11 b 7, and a pair ofterminals (connecting portions) 11 c 1 and 11 c 2.

The narrow strip-shaped portions 11 a 1 to 11 a 6 each extend in theY-axis direction. The narrow strip-shaped portion 11 a 1 is disposed atthe most positive side in the X-axis direction. The negative end in theY-axis direction of the narrow strip-shaped portion 11 a 1 is formed onthe bias magnet film 11 b 1. The bias magnet film 11 b 1 is connected tothe terminal 11 c 1. The other end of the narrow strip-shaped portion 11a 1, or the positive end in the Y-axis direction, is formed on the biasmagnet film 11 b 2.

One end of the narrow strip-shaped portion 11 a 2 adjacent to the narrowstrip-shaped portion 11 a 1 at the negative side in the X-axis directionis formed on the bias magnet film 11 b 2 and is connected to the narrowstrip-shaped portion 11 a 1 on the bias magnet film 11 b 2. The otherend of the narrow strip-shaped portion 11 a 2 is formed on the biasmagnet film 11 b 3.

One end of the narrow strip-shaped portion 11 a 3 adjacent to the narrowstrip-shaped portion 11 a 2 at the negative side in the X-axis directionis formed on the bias magnet film 11 b 3 and is connected to the narrowstrip-shaped portion 11 a 2 on the bias magnet film 11 b 3. The otherend of the narrow strip-shaped portion 11 a 3 is formed on the biasmagnet film 11 b 4.

One end of the narrow strip-shaped portion 11 a 4 adjacent to the narrowstrip-shaped portion 11 a 3 at the negative side in the X-axis directionis formed on the bias magnet film 11 b 4 and is connected to the narrowstrip-shaped portion 11 a 3 on the bias magnet film 11 b 4. The otherend of the narrow strip-shaped portion 11 a 4 is formed on the biasmagnet film 11 b 5.

One end of the narrow strip-shaped portion 11 a 5 adjacent to the narrowstrip-shaped portion 11 a 4 at the negative side in the X-axis directionis formed on the bias magnet film 11 b 5 and is connected to the narrowstrip-shaped portion 11 a 4 on the bias magnet film 11 b 5. The otherend of the narrow strip-shaped portion 11 a 5 is formed on the biasmagnet film 11 b 6.

One end of the narrow strip-shaped portion 11 a 6 adjacent to the narrowstrip-shaped portion 11 a 5 at the negative side in the X-axis directionis formed on the bias magnet film 11 b 6 and is connected to the narrowstrip-shaped portion 11 a 5 on the bias magnet film 11 b 6. The otherend of the narrow strip-shaped portion 11 a 6 is formed on the biasmagnet film 11 b 7. The bias magnet film 11 b 7 is connected to theterminal 11 c 2. As described above, the conventional GMR element 11 hasthe plurality of narrow strip-shaped portions connected in series in aserpentine (zigzag like) manner.

Each of the narrow strip-shaped portions 11 a 1 to 11 a 6 is made of aconventional spin-valve film shown in FIG. 4A. The spin-valve filmincludes a free layer F formed (deposited) on the substrate 10 a, aspacer layer S formed on the free layer F, a fixed magnetization layer Pformed on the spacer layer S, and a protective layer (capping layer) Cformed on the fixed magnetization layer P. In practice, aninsulating/wiring layer (not shown) made of SiO₂ or SiN may be formedbetween the substrate 10 a and the free layer F.

The magnetization direction of the free layer F changes depending on thedirection of the external magnetic field. The free layer F includes aCoZrNb amorphous magnetic layer formed on the substrate 10 a, a NiFemagnetic layer formed on the CoZrNb amorphous magnetic layer, and a CoFemagnetic layer formed on the NiFe magnetic layer. These layersconstitute a soft ferromagnetic film.

Since the narrow strip-shaped portions 11 a 1 to 11 a 6 extend in theY-axis direction, the free layer F also extends in the Y-axis directionto have a longitudinal direction in the Y-axis direction. Themagnetization of the free layer F, when an external magnetic field isnot applied (hereinafter referred to as the “initial magnetization”) tothe free layer F, is oriented in the longitudinal direction of the freelayer F (positive Y-axis direction for the conventional GMR element 11)due to shape anisotropy (uniaxial anisotropy).

The spacer layer S is made of a nonmagnetic conductive material (Cu inthe present embodiment).

The fixed magnetization layer P is a single-layer-pinned fixedmagnetization layer which is a lamination of a ferromagnetic magneticlayer Pd made of CoFe and an antiferromagnetic layer Pi made of a PtMnalloy containing 45 to 55 mol % of Pt. The magnetization (magnetizationvector) of the CoFe magnetic layer Pd is fixed in the positive X-axisdirection by exchange coupling with the antiferromagnetic layer Piserving as a pinning layer, thereby serving as a pinned layer. The fixedmagnetization direction of the pinned layer in each conventional GMRelement is the magnetization direction of the magnetic layer Pd made ofCoFe.

The protective layer C is made of titanium (Ti) or tantalum (Ta).

Referring again to FIGS. 2 and 3, the bias magnet films 11 b 1 to 11 b 7are made of a hard ferromagnetic material, such as CoCrPt, having a highcoercive force and a high remanence ratio, and are magnetized to serveas permanent magnet films (hard magnet films). Each of the bias magnetfilms 11 b 1 to 11 b 7 is magnetically coupled with the free layer Fwhich is formed right on each of the magnet films, and applies a biasmagnetic field to the free layer F in the longitudinal direction of thefree layer F (positive Y-axis direction for the conventional GMR element11).

With the above structure, the resistance of the conventional GMR element11 is equal to a sum of the resistances of the narrow strip-shapedportions 11 a 1 to 11 a 6 and is obtained from the terminals 11 c 1 and11 c 2. Accordingly, as shown in FIGS. 4B and 4C, the conventional GMRelement 11 has a resistance which varies depending on an externalmagnetic field H varying in the range of −Hc to +Hc along the fixedmagnetization direction (positive X-axis direction in this case) of theCoFe magnetic layer Pd in the fixed magnetization layer P. That is, theresistance decreases as the intensity of the external magnetic field inthe positive X-axis direction increases. In other words, theconventional GMR element 11 detects magnetic fields in the directionantiparallel to (180° different from) the fixed magnetization directionof the CoFe magnetic layer Pd adjoining (abutting) the spacer layer S.In this instance, the conventional GMR element 11 exhibits asubstantially constant resistance for external magnetic fields changingalong the Y axis.

Regarding the SAF elements 13, 14, 23, and 24, those elements havesubstantially the same structure, except for their positions on thesubstrate 10 a. The following description illustrates the structure ofthe SAF element 13 as a representative example.

The SAF element 13 has an almost the same film structure as theconventional GMR element 11, except for its spin-valve film structure.The SAF element 13 is a synthetic spin-valve film shown in FIG. 5A. Thesynthetic spin-valve film includes a free layer F formed on thesubstrate 10 a, a spacer layer S formed on the free layer F, a fixedmagnetization layer P′ formed on the spacer layer S, and a protectivelayer (capping layer) C formed on the fixed magnetization layer P′.

In the synthetic spin-valve film, the free layer F, the spacer layer S,and the protective layer C have the same structures as those of theconventional spin-valve film shown in FIG. 4A. In other words, asmentioned above, only the fixed magnetization layer P′ has a structuredifferent from the fixed magnetization layer P of the conventionalspin-valve film.

The fixed magnetization layer P′ is a plural-layer-pinned fixedmagnetization layer which is a lamination of a first ferromagnetic layerP1 made of CoFe, an exchange coupling layer Ex made of Ru and formed onthe first ferromagnetic layer P1, a second ferromagnetic layer P2 madeof CoFe formed on the exchange coupling layer Ex, and an exchange biaslayer (antiferromagnetic layer) Eb made of a PtMn alloy containing 45 to55 mol % of Pt. That is, the first ferromagnetic layer P1, the exchangecoupling layer Ex, the second ferromagnetic layer P2, the exchange biaslayer Eb are deposited in this order.

The exchange coupling layer Ex lies between the first ferromagneticlayer P1 and the second ferromagnetic layer P2 in a sandwich manner. Thefirst ferromagnetic layer P1 serves as a pinned layer whosemagnetization direction is fixed so as not to change in response to thechanges of the external magnetic field because of the cooperation of theexchange coupling layer Ex and the second ferromagnetic layer P2. Theexchange bias layer Eb serves as a pinning layer for fixing, togetherwith the second ferromagnetic layer P2 and the exchange coupling layerEx in between, the magnetization direction of the first ferromagneticlayer P1 which is the pinned layer. Note that the first ferromagneticlayer P1, the exchange coupling layer Ex, and the second ferromagneticlayer P2 may together be referred to as a pinned layer, instead.

The exchange bias layer Eb establishes an exchange coupling with thesecond ferromagnetic layer P2 to fix the magnetization (magnetizationvector) of the second ferromagnetic layer P2 in the positive X-axisdirection. The first ferromagnetic layer P1 and the second ferromagneticlayer P2 are exchange-coupled through the exchange coupling layer Extherebetween. Thus, the magnetization direction of the firstferromagnetic layer P1 is antiparallel to the magnetization direction ofthe second ferromagnetic layer P2, as indicated by the arrows in FIG.5B. Consequently, the magnetization of the first ferromagnetic layer P1is fixed in the negative X-axis direction.

The SAF element 13 having the above-described structure has a resistancewhich varies depending on an external magnetic field H varying in therange of −Hc to +Hc along the fixed magnetization direction of the firstferromagnetic layer (pinned layer) P1 in the fixed magnetization layerP′, as shown in FIG. 5C. That is, the resistance increases as theintensity of the external magnetic field H in the positive X-axisdirection increases. In other words, the SAF element 13 detects magneticfields in the direction antiparallel to the fixed magnetizationdirection of the first magnetic layer P1 adjoining (abutting) the spacerlayer S. In this instance, the SAF element 13 exhibits a substantiallyconstant resistance for external magnetic fields changing along the Yaxis.

Referring again to FIG. 1, the conventional GMR element 11 is disposedin the vicinity of the end in the X-axis positive direction of thesubstrate 10 a and in an upper-middle position in the Y-axis directionof the substrate 10 a. The magnetic-field-detecting direction of theconventional GMR element 11 is in the negative X-axis direction. Theconventional GMR element 12 is disposed in the vicinity of the end inthe X-axis positive direction of the substrate 10 a and in alower-middle position in the Y-axis direction of the substrate 10 a. Themagnetic-field-detecting direction of the conventional GMR element 12 isin the negative X-axis direction.

The SAF element 13 is disposed in an upper-middle position in the Y-axisdirection of the substrate 10 a and at the negative side in the X-axisdirection of the conventional GMR element 11 with a short distancetherebetween. The magnetic-field-detecting direction of the SAF element13 is in the positive X-axis direction. The SAF element 14 is disposedin a lower-middle position in the Y-axis direction of the substrate 10 aand at the negative side in the X-axis direction of the conventional GMRelement 12 with a short distance therebetween. Themagnetic-field-detecting direction of the SAF element 14 is in thepositive X-axis direction.

As described above, these elements 11 to 14 are provided adjacent eachother in a region (first small region) in the vicinity of the end in theX-axis positive direction of the substrate 10 a.

The conventional GMR element 21 is disposed in the vicinity of the endin the Y-axis positive direction of the substrate 10 a and in aleft-middle position in the X-axis direction of the substrate 10 a. Themagnetic-field-detecting direction of the conventional GMR element 21 isin the negative Y-axis direction. The conventional GMR element 22 isdisposed in the vicinity of the end in the Y-axis positive direction ofthe substrate 10 a and in a right-middle position in the X-axisdirection of the substrate 10 a. The magnetic-field-detecting directionof the conventional GMR element 22 is in the negative Y-axis direction.

The SAF element 23 is disposed in a left-middle position in the X-axisdirection of the substrate 10 a and at the negative side in the Y-axisdirection of the conventional GMR element 21 with a short distancetherebetween. The magnetic-field-detecting direction of the SAF element23 is in the positive Y-axis direction. The SAF element 24 is disposedin a right-middle position in the X-axis direction of the substrate 10 aand at the negative side in the Y-axis direction of the conventional GMRelement 22 with a short distance therebetween. Themagnetic-field-detecting direction of the SAF element 24 is in thepositive Y-axis direction.

As described above, these elements 21 to 24 are provided adjacent eachother in a region (second small region away from the first small regionat a predetermined distance) in the vicinity of the end in the Y-axispositive direction of the substrate 10 a.

The magnetic sensor 10 includes an X-axis magnetic sensor (whosemagnetic-field-detecting direction is in the X-axis direction)constituted of the elements 11 to 14 and a Y-axis magnetic sensor (whosemagnetic-field-detecting direction is in the Y-axis direction)constituted of the elements 21 to 24.

As shown in the equivalent circuit of FIG. 6A, the X-axis magneticsensor includes the elements 11 to 14 connected in a full-bridgeconfiguration through conducting wires not shown in FIG. 1. The graphsadjacent to the elements 11 to 14 in FIG. 6A each show thecharacteristics of their adjacent elements, that is, the changes inresistance R in response to the intensity of an external magnetic fieldvarying in the X-axis direction (component Hx along the positive X-axisdirection of the external magnetic field H). The conventional GMRelements are each indicated by “Conv” following their respectivereference numerals; the SAF elements are each indicated by “SAF”following their respective reference numerals. Such graphs and theletters “Conv” and “SAF” have the similar meaning in similar drawingsthroughout the specification.

The X-axis magnetic sensor will be further described in detail below. Anend of the conventional GMR element 11 is connected to an end of the SAFelement 13 to form a first sub-circuit. A first potential +V (a constantvoltage supplied from a constant-voltage supply not shown in the figure)is applied to the other end of the conventional GMR element 11. Theother end of the SAF element 13 is grounded (connected to GND). In otherwords, a second potential different from the first potential is appliedto this other end of the SAF element 13.

Also, an end of the conventional GMR element 12 is connected to an endof the SAF element 14 to form a second sub-circuit. The first potential+V is applied to the other end of the SAF element 14. The other end ofthe conventional GMR element 12 is grounded (connected to GND). In otherwords, the second potential is applied to this other end of theconventional GMR element 12.

The potential difference Vox (=VQ2−VQ1) between the potential VQ1 at thejunction Q1 where the conventional GMR element 11 and the SAF element 13are connected and the potential VQ2 at the junction Q2 where theconventional GMR element 12 and the SAF element 14 are connected isextracted as the output (first output) of the X-axis magnetic sensor.Thus, the X-axis magnetic sensor outputs a voltage Vox that issubstantially proportional to the external magnetic field Hx and thatdecreases as the external magnetic field Hx increases, as shown in FIG.6B.

As shown in the equivalent circuit of FIG. 7A, the Y-axis magneticsensor includes the elements 21 to 24 connected in a full-bridgeconfiguration through conducting wires not shown in FIG. 1. The graphsadjacent to the elements 21 to 24 in FIG. 7A each show thecharacteristics of their adjacent elements, that is, the changes inresistance R in response to the intensity of an external magnetic fieldvarying in the Y-axis direction (component Hy along the positive Y-axisdirection of the external magnetic field H).

The Y-axis magnetic sensor will be further described in detail below. Anend of the conventional GMR element 21 is connected to an end of the SAFelement 23 to form a third sub-circuit. A first potential +V is appliedto the other end of the conventional GMR element 21. The other end ofthe SAF element 23 is grounded (connected to GND). In other words, asecond potential different from the first potential is applied to thisother end of the SAF element 23.

Also, an end of the conventional GMR element 22 is connected to an endof the SAF element 24 to form a fourth sub-circuit. The first potential+V is applied to the other end of the SAF element 24. The other end ofthe conventional GMR element 22 is grounded (connected to GND). In otherwords, the second potential is applied to this other end of theconventional GMR element 22.

The potential difference Voy (=VQ3−VQ4) between the potential VQ3 at thejunction Q3 where the conventional GMR element 21 and the SAF element 23are connected and the potential VQ4 at the junction Q4 where theconventional GMR element 22 and the SAF element 24 are connected isextracted as the output (second output) of the Y-axis magnetic sensor.Thus, the Y-axis magnetic sensor outputs a voltage Voy that issubstantially proportional to the external magnetic field Hy varying inthe Y-axis direction and that increases as the external magnetic fieldHy increases, as shown in FIG. 7B.

Fixing of Magnetization Directions of Pinned Layers

A technique will now be described for fixing the magnetizationdirections of the pinned layers of the elements 11 to 14 and 21 to 24.First, a plurality of films M corresponding to the elements 11 to 14 and21 to 24 are formed in an island-shaped manner on a substrate 10 a-1that will become the substrate 10 a later, as shown in the plan view inFIG. 8. These films M are disposed so that when the substrate 10 a-1 iscut along the dotted-chain lines CL in FIG. 8 into a plurality ofmagnetic sensors 10 shown in FIG. 1 in a cutting step, the elements 11to 14 and 21 to 24 are arranged on the substrate 10 a as shown inFIG. 1. How these films M are formed will be described later.

A magnet array 30 shown in FIGS. 9 and 10 is prepared. FIG. 9 is a planview of the magnet array 30. FIG. 10 is a sectional view of the magnetarray 30 taken along line II-II in FIG. 9. The magnet array 30 includesa plurality of rectangular solid permanent magnets (permanent barmagnets) 31 and a plate 32 made of a transparent quartz glass. Thepermanent magnets 31 are arrayed in a tetragonal lattice manner, andtheir upper surfaces are fixed to the lower surface of the plate 32. Thepermanent magnets 31 are arranged in such a manner that the end surfacesin the same plane of any two adjacent permanent magnets 31 havepolarities opposite to each other.

That is, the magnet array 30 has a plurality of substantiallyrectangular solid permanent magnets 31, each having a substantiallysquare section perpendicular to the central axis of one of the permanentmagnets. The permanent magnets 31 are arranged at small intervals suchthat each of the barycenters of the end surfaces of the permanentmagnets corresponds to the each of lattice points of a tetragonallattice, and such that their magnetic poles have polarities opposite tothose of the magnetic poles of their adjacent permanent magnets 31, theend surfaces having the same shape as the section.

FIG. 11 is a perspective view of five of the permanent magnets 31. Asclearly shown in FIG. 11, the end surfaces (surfaces provided with amagnetic pole) of the permanent magnets 31 generate magnetic fieldswhose magnetic field lines direct from an N pole to its adjacent Spoles. That is, the magnetic fields having directions different by anangle of 90° with each other are generated above the magnet array 30. Inthe present embodiment, these magnetic fields are used for fixing themagnetization directions of the pinned layers in the elements 11 to 14and 21 to 24.

Next, the substrate 10 a-1 having the films M is disposed over themagnet array 30. Specifically, the substrate 10 a-1 and the magnet array30 are placed with a relative positional relationship such that twoadjacent edges of each square formed by cutting the substrate 10 a-1along lines CL, not having the films M adjacent thereto, and theirintersection are aligned with two adjacent edges and their intersectionof the corresponding permanent magnet, as shown in the plan view in FIG.12. Thus, each film M is exposed to a magnetic field oriented in thedirection perpendicular to the longitudinal direction of the narrowstrip-shaped portions of the film M, as indicated by the arrows in FIGS.11 and 12.

Then, such a set of the substrate 10 a-1 and the magnet array 30 isheated to 250 to 280° C. in a vacuum and subsequently allowed to standfor about 4 hours for magnetic field heat treatment. Consequently, themagnetization directions of the fixed magnetization layers P (pinnedlayers Pd) of the conventional GMR elements and the fixed magnetizationlayers P′ (pinned layers P1) of the SAF elements are fixed.

Referring now to FIG. 13, for example, in order to form two closelylying conventional GMR elements whose magnetic-field-detectingdirections are antiparallel to (180° different from) each other, themagnetic field applied during magnetic field heat treatment to one filmM1 of the films becoming one of the conventional GMR elements must beoriented in the direction antiparallel to the direction of the magneticfield applied to the other film M2 also becoming the other one of theconventional GMR elements. In general, it is however difficult togenerate large antiparallel magnetic fields in a small area.Accordingly, in a known process, the two conventional GMR elements aredisposed at a relatively large distance in order allow them to berespectively exposed to two antiparallel magnetic fields from an N poleto its two adjacent S poles of the magnet array 30 (or from an S pole toits two adjacent N poles of the magnetic array 30).

On the other hand, as shown in FIG. 14, if magnetic fields oriented inthe same direction are applied for magnetic field heat treatment to twoclosely lying films M3 and M4 respectively intended to become aconventional GMR element and a SAF element, giant magnetoresistiveelements are produced whose magnetic-field-detecting directions areantiparallel to each other. This is because the magnetization of thepinned layer Pd (CoFe magnetic layer) of the fixed magnetization layer Pin the film intended to become a conventional GMR element and themagnetization of the second ferromagnetic layer P2 of the fixedmagnetization layer P′ in the film intended to become a SAF element arefixed in the same direction each other, while the magnetizationdirection of the first ferromagnetic layer P1 of the fixed magnetizationlayer P′ is antiparallel to that of the second ferromagnetic layer P2.

Thus, this technique can provide at least two giant magnetoresistiveelements arranged in a very small area, having antiparallelmagnetic-field-detecting directions each other.

In practice, after the magnetic field heat treatment, the substrate 10a-1 having the films is subjected to necessary treatment, includingpolarization of the bias magnet films, and thereafter, is cut alonglines CL shown in FIG. 12. As a result, a plurality of magnetic sensors10 shown in FIG. 1 and a plurality of magnetic sensors 40 shown in FIG.15 are simultaneously manufactured.

The magnetic sensor 40 thus manufactured is referred to as the “S-typemagnetic sensor 40” for the sake of convenience. The S-type magneticsensor 40 includes giant magnetoresistive elements 41 to 44 and 51 to54. The elements 41, 42, 51, and 52 are conventional GMR elements; andthe elements 43, 44, 53, and 54 are SAF elements. The initialmagnetizations of the free layers in these elements and the fixedmagnetizations of the pinned layers (ferromagnetic layers adjoining thespacer layers), whose directions are antiparallel to themagnetic-field-detecting directions, are oriented as shown in FIG. 15.

The elements 41, 42, 43, and 44 are referred to as a first, a second, athird, and a fourth X-axis magnetic detecting element, respectively.These X-axis magnetic detecting elements are connected in a full bridgeconfiguration to form an X-axis magnetic sensor, as in the elements 11,12, 13, and 44 of the magnetic sensor 10. Similarly, the elements 51,52, 53, and 54 are referred to as a first, a second, a third, and afourth Y-axis magnetic detecting element, respectively. These Y-axismagnetic detecting elements are connected in a full bridge configurationto form a Y-axis magnetic sensor, as in the elements 21, 22, 23, and 24of the magnetic sensor 10.

First Method for Forming Films M

A first method (film formation step or a film forming step) for formingthe films M (intended to act as the conventional GMR element and the SAFelement) will now be described.

Step 1: A substrate 10 a is prepared as shown in FIG. 16A. The substrate10 a has an insulating/wiring layer including wires 10 a 1 used for thebridge configuration and an insulating layer 10 a 2 covering the wires10 a 1. The insulating layer 10 a 2 has via holes VIA used forelectrical connection. The wires 10 a 1 are partially exposed at thebottoms of the via holes VIA.

Step 2: Referring to FIG. 16B, a CoCrPt layer 10 b intended to becomethe bias magnet films is formed on the upper surface of the substrate 10a by sputtering.

Step 3: Referring to FIG. 16C, a resist layer R1 is formed on the uppersurface of the CoCrPt layer 10 b. The resist layer R1 is patterned so asto cover only necessary regions for the bias magnet films. In otherwords, the resist layer R1 is formed into a resist mask.

Step 4: Referring to FIG. 17A, unnecessary regions of the CoCrPt layer10 b are removed by ion milling.

Step 5: Referring to FIG. 17B, the resist layer R1 is removed.

Step 6: Referring to FIG. 17C, a composite layer 10 c as shown in FIG.4A, intended to become the conventional GMR elements is formed over theupper surface of the substrate 10 a.

Step 7: Referring to FIG. 18A, a resist layer R2 is formed on the uppersurface of the composite layer 10 c and subsequently patterned so as tocover only necessary regions of the composite layer 10 c. In otherwords, the resist layer R2 is formed into a resist mask.

Step 8: Referring to FIG. 18B, unnecessary regions of the compositelayer 10 c are removed by ion milling.

Step 9: Referring to FIG. 18C, the resist layer R2 is removed.

Step 10: Referring to FIG. 19A, a SiN insulating interlayer INS1 isformed by chemical vapor deposition (CVD). Alternatively, the insulatinginterlayer INS1 may be formed of SiO₂.

Step 11: Referring to FIG. 19B, a resist layer R3 is formed on the uppersurface of the insulating interlayer INS1 and subsequently patterned soas to cover only regions that are to have the conventional GMR elements.In other words, the resist layer R3 is formed into a resist mask.

Step 12: Referring to FIG. 19C, unnecessary regions of the insulatinginterlayer INS1 are removed by ion milling.

Step 13: Referring to FIG. 20A, the resist layer R3 is removed.

Step 14: Referring to FIG. 20B, a composite layer 10 d as shown in FIG.5A, intended to become the SAF elements is formed over the upper surfaceof the substrate 10 a.

Step 15: Referring to FIG. 20C, a resist layer R4 is formed on the uppersurface of the composite layer 10 d and subsequently patterned so as tocover only necessary regions of the composite layer 10 d. In otherwords, the resist layer R4 is formed into a resist mask.

Step 16: Referring to FIG. 21A, unnecessary regions of the compositelayer 10 d are removed by ion milling.

Step 17: Referring to FIG. 21B, the resist layer R4 is removed.

With steps above, the films intended to act as the conventional GMRelements are provided on the left of FIG. 21B, and the films intended toact as the SAF elements are provided on the right. Following thesesteps, the above-described magnetic field heat treatment is performed.

Note that, although the films intended to act as the conventional giantmagnetoresistive elements are formed before the films intended to act asthe SAF elements are formed in the above method, the films intended toact as the SAF elements may be formed before the films intended to actas the conventional giant magnetoresistive elements are formed.

As described above, the first method includes a film forming stepincluding the sub steps of:

forming (depositing) on a single substrate a first composite layer (orfilms) intended to act as one of the first giant magnetoresistiveelements (conventional GMR elements) and the second giantmagnetoresistive elements (SAF elements) (Step 6);

removing unnecessary regions of the first composite layer (Steps 7 to9);

covering (coating) the first composite layer with an insulating layerafter the unnecessary regions of the first composite layer are removed(Steps 10 to 13);

forming (depositing) a second composite layer (or films) intended to actas the other giant magnetoresistive elements on the substrate and theinsulating layer (Step 14); and

removing unnecessary regions of the second composite layer (Steps 15 to17).

By the method described above, films intended to act as the conventionalGMR elements and the SAF elements are formed on a single substratewithout a break (in a continuous fashion).

Second Method for Forming Films M

A second method for forming the films M will now be described. Thesecond method provides films in which the fixed magnetization layers Pand P′ is formed on a substrate and the spacer layer S and the freelayer F are formed on the fixed magnetization layers P and P′. This typeof film can be called a bottom spin-valve film.

Step 1: A substrate 10 a is prepared as shown in FIG. 22A. The substratehas the same structure as the substrate 10 a shown in FIG. 16A.

Step 2: Referring to FIG. 22B, a CoCrPt layer 10 b intended to becomethe bias magnet films is formed on the upper surface of the substrate 10a by sputtering.

Step 3: Referring to FIG. 22C, a resist layer R1 is formed on the uppersurface of the CoCrPt layer 10 b. The resist layer R1 is patterned so asto cover only necessary regions for the bias magnet films. In otherwords, the resist layer R1 is formed into a resist mask.

Step 4: Referring to FIG. 23A, unnecessary regions of the CoCrPt layer10 b are removed by ion milling.

Step 5: Referring to FIG. 23B, the resist layer R1 is removed. The stepsup to Step 5 of this method are the same as the steps up to Step 5 ofthe first method.

Step 6: Referring to FIG. 24A, a PtMn layer, a CoFe layer, and a Rulayer are formed (deposited or laminated) in this order to form part ofa composite layer (films) intended to act as the SAF elements(hereinafter may be referred to as “first SAF composite layer”). FIG.24B is an enlarged view of the first SAF composite layer.

Step 7: Referring to FIG. 25A, a resist layer R5 is formed (deposited)on the upper surface of the first SAF composite layer and subsequentlypatterned so as to cover necessary regions for the first SAF compositelayer and their vicinities. In other words, the resist layer R5 isformed into a resist mask. FIG. 25B is an enlarged view of an end of theresist layer R5 and its vicinity.

Step 8: Referring to FIG. 26A, the Ru layer and part of the CoFe layerin the regions necessary for the first SAF composite layer are removedby ion milling. FIG. 26B is an enlarged view of the first SAF compositelayer after the ion milling.

Step 9: Referring to FIG. 26C, the resist layer R5 is removed.

Step 10: Referring to FIG. 27A, a CoFe layer, and a Cu layer intended toact as the spacer layer, a CoFe layer, a NiFe and a CoZrNb layer thatare intended to act as the free layer are formed (deposited orlaminated) in this order over the upper surface of the layers alreadyformed by steps 1 to 9. FIG. 27B is an enlarged view of the resultingcomposite layer. Then, magnetic field heat treatment is performed on theresulting composite layer.

Step 11: Referring to FIG. 28A, a resist layer R6 is formed on the uppersurface of the composite layer and subsequently patterned so as to coveronly regions that are to have the conventional GMR elements and SAFelements. In other words, the resist layer R6 is formed into a resistmask.

Step 12: Referring to FIG. 28B, unnecessary regions of the compositelayer are removed by ion milling.

Step 13: Referring to FIG. 28C, the resist layer R6 is removed.

With steps above, films intended to act as the SAF elements are providedon the left of FIG. 28C, and films intended to act as the conventionalGMR elements are provided on the right.

As described above, the second method includes a film forming stepincluding the sub steps of:

forming (depositing) layers intended to act as the pinning layer, secondferromagnetic layer, and exchange coupling layer of the second giantmagnetoresistive element (SAF element) in this order on a substrate toform a first pre-composite layer (first SAF composite layer) (Step 6);

completely removing the layer intended to act as the exchange couplinglayer of the first pre-composite layer from regions that are to have thefirst giant magnetoresistive elements (conventional GMR elements)without removing the first pre-composite layer from regions that are tohave the second giant magnetoresistive elements (Steps 7 to 9); and

further forming (depositing) a layer intended act as a ferromagneticlayer having the same composition as the second ferromagnetic layer andlayers intended to act as the spacer layer and the free layer of thefirst magnetoresistive element and the second giant magnetoresistiveelement, in this order, over the entire upper surface after removing thelayer intended to act as the exchange coupling layer of the firstpre-composite layer from regions that are to have the first giantmagnetoresistive elements (Step 10).

By the method described above, films intended to act as the conventionalGMR elements and the SAF elements are formed on a single substratewithout a break (in a continuous fashion).

Third Method for Forming Films M

A third method for forming the films M will now be described withreference to FIG. 29. The third method provides films having the samestructures as in the first method, where the free layer F is formed on asubstrate, the spacer layer S and the fixed magnetization layer P and P′are formed on the free layer F. This type of film can be called a topspin-valve film.

Step 1: A composite layer (a CoZrNb layer, a NiFe layer, and a CoFelayer) intended to act as the free layer F, a layer intended to act asthe spacer layer S, a CoFe layer, and a Ru layer are formed (deposited)in this order on a substrate 10 a having a layer 10 b intended to act asthe bias magnet film by performing the steps 1 to Step 5 of the firstmethod, as shown in Step 1 of FIG. 29.

Step 2: Referring to Step 2 of FIG. 29, a resist layer is formed inregions that are to have the SAF elements. Then, the Ru layer and theupper portion of the CoFe layer underlying the Ru layer are removed fromunnecessary regions by ion milling.

Step 3: The resist layer is removed.

Step 4: Referring to Step 4 of FIG. 29, a CoFe layer, a PtMn layer, anda Ta layer are formed (deposited) in this order, thereby providing alayer intended to act as the fixed magnetization layer P′ of the SAFelements in the portion where the Ru layer remains, and a layer intendedto act as the fixed magnetization layer P of the conventional GMRelement over regions which do not have the Ru layer.

Step 5: Then, magnetic field heat treatment is performed to fix themagnetization directions of the pinned layers in the fixed magnetizationlayers P and P′.

Step 6: Finally, the same patterning as in the steps shown in FIGS. 28Ato 28C is performed to form the conventional GMR elements and the SAFelements.

As described above, the third method includes a film forming stepincluding the sub step of:

forming (depositing) a layer intended to act as the free layer of thefirst giant magnetoresistive element (the conventional GMR element) andthe second giant magnetoresistive element (the SAF element), a layerintended to act as the spacer layer of the first and the second giantmagnetoresistive element, a CoFe layer intended to act as the firstferromagnetic layer of the second giant magnetoresistive element, and alayer intended to act as the exchange coupling layer of the second giantmagnetoresistive element, in this order, on a substrate to form a secondpre-composite layer (Step 1);

completely removing the layer intended to act as the exchange couplinglayer of the second pre-composite layer from regions that are to havethe first giant magnetoresistive elements without removing the secondpre-composite layer in regions that are to have the second giantmagnetoresistive elements (Steps 2 and 3); and

forming a ferromagnetic layer (CoFe layer) having the same compositionas the layer intended to act as the first ferromagnetic layer and alayer intended to act as the pinning layer of the first giantmagnetoresistive element and the second giant magnetoresistive element,in this order, over the entire upper surface after the layer intended toact as the exchange coupling layer of the second pre-composite layerfrom regions that are to have the first giant magnetoresistive elementsis removed (Step 4).

By the method described above, films intended to act as the conventionalGMR elements and the SAF elements are formed on a single substratewithout a break (in a continuous fashion).

As described above, the magnetic sensor 10 includes the conventional GMRelements and the SAF elements on a single substrate. By forming filmsintended to act as these elements close to each other and applying amagnetic field oriented in a single direction to the films, the elementswhose magnetic-field-detecting directions are antiparallel to each othercan be disposed in a very small area. Hence, the magnetic sensor 10 canbe very small.

The giant magnetoresistive elements 11 to 14 and 21 to 24 formed on thesubstrate 10 a of the magnetic sensor 10 are coated with a resin filmand the like. Therefore, if the substrate 10 a or the resin film isdeformed by heat or external stress, the giant magnetoresistive elements11 to 14 and 21 to 24 are also deformed by the heat or the stressaccordingly and their resistances are varied. Consequently, the bridgecircuit of a magnetic sensor in which the giant magnetoresistiveelements are connected in a bridge configuration, as in the magneticsensor 10, loses its balance and the output is varied by the stress.Thus, such a magnetic sensor cannot accurately detect the intensity ofexternal magnetic fields.

However, in the magnetic sensor 10, the giant magnetoresistive elements11 to 14 (or giant magnetoresistive elements 21 to 24) forming afull-bridge circuit are disposed in a very small area on the substrate10 a, and thus, a stress (for example, tensile stress or compressivestress) is almost uniformly placed on these elements. The resistances ofthe giant magnetoresistive elements therefore evenly increase ordecrease. Accordingly, the possibility of losing the balance of thebridge circuit can be reduced. Thus, the magnetic sensor 10 canaccurately detect magnetic fields.

Second Embodiment

A magnetic sensor according to a second embodiment of the presentinvention will now be described. As shown in FIG. 30, a magnetic sensor50 includes a single substrate 50 a, conventional GMR elements 51G to54G, SAF elements 61S to 64S, conventional GMR elements 71G to 74G, andSAF elements 81S to 84S.

The substrate 50 a is a thin silicon plate having the same shape as thesubstrate 10 a.

The conventional GMR elements 51G to 54G and 71G to 74G each have thesame structure as the foregoing conventional GMR element 11. The SAFelements 61S to 64S and 81S to 84S each have the same structure as theforegoing SAF element 13. The spin-valve film of each element (e.g., thethickness of the layers of the spin-valve film) is designed so that theelements have the same resistance if magnetic fields with an identicalintensity are applied to the elements in their respectivemagnetic-field-detecting directions, and so that the resistances of theelements vary by the same amount (to the same extent) if stresses havingan identical magnitude (and an identical direction) are respectivelyplaced on the elements.

In the present embodiment, the conventional GMR elements 51G and 52G maybe referred to as first giant magnetoresistive elements; the SAFelements 61S and 62S may be referred to as second giant magnetoresistiveelements; the conventional GMR elements 53G and 54G may be referred toas fifth giant magnetoresistive elements; and the SAF elements 63S and64S may be referred to as sixth giant magnetoresistive elements.

FIG. 30 and the following Tables 1 to 4 show the element positions onthe substrate 50 a, the fixed magnetization directions of the pinnedlayer Pd in the fixed magnetization layers P of the conventional GMRelements 51G to 54G and 71G to 74G, the fixed magnetization directionsof the first ferromagnetic layers P1 (i.e., the pinned layers) in thefixed magnetization layers P′ of the SAF elements 61S to 64S and 81S to84S, and the magnetic-field-detecting direction of each elements.

TABLE 1 Magnetization Initial Magnetic- direction of magnetizationfield- Pinned layer direction of detecting Element Position on substrate50a Pd free layer F direction Conventional Y-axis direction:upper-middle; Negative Negative Positive GMR 51G X-axis direction:vicinity of X-axis Y-axis X-axis negative end Conventional Y-axisdirection: lower-middle; Negative Negative Positive GMR 52G X-axisdirection: vicinity of X-axis Y-axis X-axis negative end ConventionalY-axis direction: upper-middle; Positive Positive Negative GMR 53GX-axis direction: vicinity of X-axis Y-axis X-axis positive endConventional Y-axis direction: lower-middle; Positive Positive NegativeGMR 54G X-axis direction: vicinity of X-axis Y-axis X-axis positive end

TABLE 2 Magnetization Initial Magnetic- direction of magnetizationfield- Pinned layer direction of detecting Element Position on substrate50a P1 free layer F direction SAF 61S Y-axis direction: upper-middle;Positive Negative Negative X-axis direction: vicinity of X-axis Y-axisX-axis negative end SAF 62S Y-axis direction: lower-middle; PositiveNegative Negative X-axis direction: vicinity of X-axis Y-axis X-axisnegative end SAF 63S Y-axis direction: upper-middle; Negative PositivePositive X-axis direction: vicinity of X-axis Y-axis X-axis positive endSAF 64S Y-axis direction: lower-middle; Negative Positive PositiveX-axis direction: vicinity of X-axis Y-axis X-axis positive end

The SAF elements 61S and 62S are disposed at the positive side in theX-axis direction of the conventional GMR elements 51G and 52Grespectively, with a short distance therebetween; the SAF elements 63Sand 64S are disposed at the negative side in the X-axis direction of theconventional GMR elements 53G and 54G respectively, with a shortdistance therebetween.

TABLE 3 Magnetization Initial Magnetic- direction of magnetizationfield- Pinned layer direction of detecting Element Position on substrate50a Pd free layer F direction Conventional X-axis direction:left-middle; Positive Positive Negative GMR 71G Y-axis direction:vicinity of Y-axis X-axis Y-axis positive end Conventional X-axisdirection: right-middle; Positive Positive Negative GMR 72G Y-axisdirection: vicinity of Y-axis X-axis Y-axis positive end ConventionalX-axis direction: left-middle; Negative Negative Positive GMR 73G Y-axisdirection: vicinity of Y-axis X-axis Y-axis negative end ConventionalX-axis direction: right-middle; Negative Negative Positive GMR 74GY-axis direction: vicinity of Y-axis X-axis Y-axis negative end

TABLE 4 Magnetization Initial Magnetic- direction of magnetizationfield- Pinned layer direction of detecting Element Position on substrate50a P1 free layer F direction SAF 81S X-axis direction: left-middle;Negative Positive Positive Y-axis direction: vicinity of Y-axis X-axisY-axis positive end SAF 82S X-axis direction: right-middle; NegativePositive Positive Y-axis direction: vicinity of Y-axis X-axis Y-axispositive end SAF 83S X-axis direction: left-middle; Positive NegativeNegative Y-axis direction: vicinity of Y-axis X-axis Y-axis negative endSAF 84S X-axis direction: right-middle; Positive Negative NegativeY-axis direction: vicinity of Y-axis X-axis Y-axis negative end

The SAF elements 81S and 82S are disposed in the negative side in theY-axis direction of the conventional GMR elements 71G and 72Grespectively, with a short distance therebetween; the SAF elements 83Sand 84S are disposed in the positive side in the Y-axis direction of theconventional GMR elements 73G and 74G respectively, with a shortdistance therebetween.

The conventional GMR elements 51G and 52G (first giant magnetoresistiveelements) and the SAF elements 61S and 62S (second giantmagnetoresistive element) are disposed close to each other in a firstregion (on the negative side in the X-axis direction of the substrate 50a) having a small area; hence, these elements lie at positions where thesame stress is applied to these elements and therefore they may bedeformed similarly each other.

The conventional GMR elements 53G and 54G (fifth giant magnetoresistiveelements) and the SAF elements 63S and 64S (sixth giant magnetoresistiveelements) are also disposed close to each other in a second region (onthe positive side in the X-axis direction of the substrate 50 a) havinga small area; hence, these elements lie at positions where the samestress is applied to these elements and therefore they may be deformedsimilarly each other.

The conventional GMR elements 71G and 72G and the SAF elements 81S and82S are also disposed close to each other in a third region (on thepositive side in the Y-axis direction of the substrate 50 a) having asmall area; hence, these elements lie at positions where the same stressis applied to these elements and therefore they may be deformedsimilarly each other.

The conventional GMR elements 73G and 74G and the SAF elements 83S and84S are also disposed close to each other in a fourth region (on thenegative side in the Y-axis direction of the substrate 50 a) having asmall area, apart from the third region; hence, these elements lie atpositions where the same stress is applied to these elements andtherefore they may be deformed similarly each other.

The magnetic sensor 50 has an X-axis magnetic sensor 50×including afirst X-axis magnetic sensor 50X1, a second X-axis magnetic sensor 50X2,and a difference circuit 50Xdif, as shown in FIG. 31.

The first X-axis magnetic sensor 50X1 includes four conventional GMRelements 51G to 54G connected in a full-bridge configuration withconducting wires (not shown in FIG. 30), as shown in the equivalentcircuit in FIG. 32A.

The first X-axis magnetic sensor 50X1 will be further described. An endof the conventional GMR element 51G is connected to an end of theconventional GMR element 53G to form a fifth sub-circuit. A firstpotential +V (a constant voltage supplied from a constant-voltage supplynot shown in the figure) is applied to the other end of the conventionalGMR element 51G. The other end of the conventional GMR element 53G isgrounded (connected to GND). In other words, a second potentialdifferent from the first potential is applied to this other end of theconventional GMR element 53G.

Also, an end of the conventional GMR element 54G is connected to an endof the conventional GMR element 52G to form a sixth sub-circuit. Thefirst potential +V is applied to the other end of the conventional GMRelement 54G. The other end of the conventional GMR element 52G isgrounded (connected to GND). In other words, the second potentialdifferent from the first potential is applied to this other end of theconventional GMR element 52G.

The potential difference VoxConv (=VQ10−VQ20) between the potential VQ10at the junction Q10 where the conventional GMR element 51G is connectedto the conventional GMR element 53G and the potential VQ20 at thejunction Q20 where the conventional GMR element 54G is connected to theconventional GMR element 52G is extracted as the output of the firstX-axis magnetic sensor (conventional GMR element output, X-axisconventional GMR element output).

The graphs adjacent to the conventional GMR elements 51G to 54G in FIG.32A each show the characteristics of their adjacent elements. In eachgraph, the solid line, the broken line, and the double-dotted chain linerepresent the changes in resistance R in response to an externalmagnetic field Hx when the conventional GMR elements are not stressed,when a tensile stress is applied to the conventional GMR elements, andwhen a compressive stress is applied to the conventional GMR elements,respectively.

When the conventional GMR elements 51G to 54G are not stressed, theoutput VoxConv of the first X-axis magnetic sensor 50X1 is substantiallyproportional to the external magnetic field Hx, and decreases as theintensity of the external magnetic field Hx increases, as shown by thesolid line in FIG. 32B.

The second X-axis magnetic sensor 50X2 includes four SAF elements 61S to64S connected in a full-bridge configuration with conducting wires (notshown in FIG. 30), as shown in the equivalent circuit in FIG. 33A.

The second X-axis magnetic sensor 50X2 will be further described. An endof the SAF element 61S is connected to an end of the SAF element 63S toform a seventh sub-circuit. A first potential +V is applied to the otherend of the SAF element 61S. The other end of the SAF element 63S isgrounded (connected to GND). In other words, a second potentialdifferent from the first potential is applied to this other end of theSAF element 63S.

Also, an end of the SAF element 64S is connected to an end of the SAFelement 62S to form an eighth sub-circuit. The first potential +V isapplied to the other end of the SAF element 64S. The other end of theSAF element 62S is grounded (connected to GND). In other words, thesecond potential different from the first potential is applied to thisother end of the SAF element 62S.

The potential difference VoxSAF (=VQ30−VQ40) between the potential VQ30at the junction Q30 where the SAF element 61S is connected to the SAFelement 63S and the potential VQ40 at the junction Q40 where the SAFelement 64S is connected to the SAF element 62S is extracted as theoutput of the second X-axis magnetic sensor 50X2 (SAF element output,X-axis SAF element output).

The graphs adjacent to the SAF elements 61S to 64S in FIG. 33A each showthe characteristics of their adjacent elements. In each graph, the solidline, the broken line, and the double-dotted chain line represent thechanges in resistance R in response to an external magnetic field Hxwhen the SAF elements are not stressed, when a tensile stress is appliedto the SAF elements, and when a compressive stress is applied to the SAFelements, respectively.

Thus, when the SAF elements 61S to 64S are not stressed, the outputVoxSAF of the second X-axis magnetic sensor 50X2 is substantiallyproportional to the external magnetic field Hx, and increases as theintensity of the external magnetic field Hx increases, as shown by thesolid line in FIG. 33B.

The difference circuit 50Xdif subtracts the output VoxConv of the firstX-axis magnetic sensor 50X1 from the output VoxSAF of the second X-axismagnetic sensor 50X2 and outputs the resulting difference, which isdefined as the output Vox of the X-axis magnetic sensor 50X, as shown inFIG. 31. The output (X-axis output) Vox of the magnetic sensor 50 issubstantially proportional to the external magnetic field Hx, andincreases as the intensity of the external magnetic field Hx increases,as shown in FIG. 34.

The magnetic sensor 50 also has a Y-axis magnetic sensor 50Y, as shownin FIG. 35. The Y-axis magnetic sensor 50Y includes a first Y-axismagnetic sensor 50Y1, a second Y-axis magnetic sensor 50Y2, and adifference circuit 50Ydif.

The first Y-axis magnetic sensor 50Y1 includes four conventional GMRelements 71G to 74G connected in a full-bridge configuration withconducting wires (not shown in FIG. 30), as shown in the equivalentcircuit in FIG. 36A.

The first Y-axis magnetic sensor 50Y1 will be further described. An endof the conventional GMR element 71G is connected to an end of theconventional GMR element 73G to form a ninth sub-circuit. A firstpotential +V is applied to the other end of the conventional GMR element71G. The other end of the conventional GMR element 73G is grounded(connected to GND). In other words, a second potential different fromthe first potential is applied to this other end of the conventional GMRelement 73G.

Also, an end of the conventional GMR element 74G is connected to an endof the conventional GMR element 72G to form a tenth sub-circuit. Thefirst potential +V is applied to the other end of the conventional GMRelement 74G. The other end of the conventional GMR element 72G isgrounded (connected to GND). In other words, the second potentialdifferent from the first potential is applied to this other end of theconventional GMR element 72G.

The potential difference VoyConv (=VQ50−VQ60) between the potential VQ50at the junction Q50 where the conventional GMR element 71G is connectedto the conventional GMR element 73G and the potential VQ60 at thejunction Q60 where conventional GMR element 74G is connected to theconventional GMR element 72G is extracted as the output of the firstY-axis magnetic sensor (conventional GMR element output, Y-axisconventional GMR element output).

The graphs adjacent to the conventional GMR elements 71G to 74G in FIG.36A each show the characteristics of their adjacent elements. In eachgraph, the solid line, the broken line, and the double-dotted chain linerepresent the changes in resistance R in response to an externalmagnetic field Hy when the conventional GMR elements are not stressed,when a tensile stress is applied to the conventional GMR elements, andwhen a compressive stress is applied to the conventional GMR elements,respectively.

When the conventional GMR elements 71G to 74G are not stressed, theoutput VoyConv of the first Y-axis magnetic sensor 50Y1 is substantiallyproportional to the external magnetic field Hy, and increases as theintensity of the external magnetic field Hy increases, as shown by thesolid line in FIG. 36B.

The second Y-axis magnetic sensor 50Y2 includes four SAF elements 81S to84S connected in a full-bridge configuration with conducting wires (notshown in FIG. 30), as shown in the equivalent circuit in FIG. 37A.

The second Y-axis magnetic sensor 50Y2 will be further described. An endof the SAF element 81S is connected to an end of the SAF element 83S toform an eleventh sub-circuit. A first potential +V is applied to theother end of the SAF element 81S. The other end of the SAF element 83Sis grounded (connected to GND). In other words, a second potentialdifferent from the first potential is applied to this end of the SAFelement 83S.

Also, an end of the SAF element 84S is connected to an end of the SAFelement 82S to form a twelfth sub-circuit. The first potential +V isapplied to the other end of the SAF element 84S. The other end of theSAF element 82S is grounded (connected to GND). In other words, thesecond potential different from the first potential is applied to thisother end of the SAF element 82S.

The potential difference VoySAF (=VQ70−VQ80) between the potential VQ70at the junction Q70 where the SAF element 81S is connected to the SAFelement 83S and the potential VQ80 at the junction Q80 where the SAFelement 84S is connected to the SAF element 82S is extracted as theoutput of the second Y-axis magnetic sensor 50Y2 (SAF element output,Y-axis SAF element output).

The graphs adjacent to the SAF elements 81S to 84S in FIG. 37A each showthe characteristics of their adjacent elements. In each graph, the solidline, the broken line, and the double-dotted chain line represent thechanges in resistance R in response to an external magnetic field Hywhen the SAF elements are not stressed, when a tensile stress is appliedto the SAF elements, and when a compressive stress is applied to the SAFelements, respectively.

When the SAF elements 81S to 84S are not stressed, the output VoySAF ofthe second Y-axis magnetic sensor 50Y2 is substantially proportional tothe external magnetic field Hy, and decreases as the intensity of theexternal magnetic field Hy increases, as shown by the solid line in FIG.37B.

The difference circuit 50Ydif subtracts the output VoySAF of the secondY-axis magnetic sensor 50Y2 from the output VoyConv of the first Y-axismagnetic sensor 50Y1 and outputs the resulting difference, which isdefined as the output Voy of the Y-axis magnetic sensor 50Y, as shown inFIG. 35. Thus, an output (Y-axis output) Voy of the magnetic sensor 50is substantially proportional to the external magnetic field Hy, andincreases as the intensity of the external magnetic field Hy increases,as shown in FIG. 38.

How the magnetic sensor 50 having the above-described structure operateswill now be described case by case. The following descriptionillustrates the operations of the X-axis magnetic sensor 50X because theX-axis magnetic sensor 50X and the Y-axis magnetic sensor 50Y operate inthe same manner, except that their magnetic-field-detecting directionsare different from each other by 90°.

(1) When no stress is applied to the conventional GMR elements 51G to54G and the SAF elements 61S to 64S:

The X-axis magnetic sensor 50X outputs a voltage Vox that increases asthe external magnetic field Hx increases.

(2) When a tensile stress is placed on the elements (conventional GMRelements 51G and 52G, SAF elements 61S and 62S) in the first regionwhile a compressive stress is placed on the elements (conventional GMRelements 53G and 54G, SAF elements 63S and 64S) in the second region:

The resistances of the conventional GMR elements 51G and 52G increase bya substantially constant value irrespective of the intensity of theexternal magnetic field Hx (as indicated by the broken line in the graphof the elements 51G and 52G in FIG. 32A). The resistances of theconventional GMR elements 53G and 54G decrease by a substantiallyconstant value irrespective of the intensity of the external magneticfield Hx (as indicated by the double-dotted chain line in the graph ofthe elements 53G and 54G in FIG. 32A). Consequently, the output VoxConvof the first X-axis magnetic sensor 50X1 decreases by a constant valueirrespective of the intensity of the external magnetic field Hx, asindicated by the dotted-chain line in FIG. 32B.

On the other hand, the resistances of the SAF elements 61S and 62Sincrease by a constant value irrespective of the intensity of theexternal magnetic field Hx (as indicated by the broken line in the graphof the elements 61S and 62S in FIG. 33A). The resistances of the SAFelement 63S and 64S decrease by a constant value irrespective of theintensity of the external magnetic field Hx (as indicated by thedouble-dotted chain line in the graph of the elements 63S and 64S inFIG. 33A). Consequently, the output VoxSAF of the second X-axis magneticsensor 50X2 decreases by a constant value irrespective of the intensityof the external magnetic field Hx, as indicated by the dotted-chain linein FIG. 33B. In this instance, both the output VoxConv of the firstX-axis magnetic sensor 50X1 and the output VoxSAF of the second X-axismagnetic sensor 50X2 decrease by a constant value. Therefore, thedifference between these two outputs (the output Vox of the X-axismagnetic sensor 50X) does not vary.

(3) When a compressive stress is placed on the elements (conventionalGMR elements 51G and 52G, SAF elements 61S and 62S) in the first regionwhile a tensile stress is placed on the elements (conventional GMRelements 53G and 54G, SAF elements 63S and 64S) in the second region:

The resistances of the conventional GMR elements 51G and 52G decrease bya substantially constant value irrespective of the intensity of theexternal magnetic field Hx (as indicated by the double-dotted chain linein the graph of the elements 51G and 52G in the FIG. 32A). Theresistances of the conventional GMR element 53G and 54G increase by asubstantially constant value irrespective of the intensity of theexternal magnetic field Hx (as indicated by the broken line in the graphof the elements 53G and 54G in FIG. 32A). Consequently, the outputVoxConv of the first X-axis magnetic sensor 50X1 increases by a constantvalue irrespective of the intensity of the external magnetic field Hx,as indicated by the broken line in FIG. 32B.

On the other hand, the resistances of the SAF elements 61S and 62Sdecrease by a constant value irrespective of the intensity of theexternal magnetic field Hx (as indicated by the double-dotted chain linein the graph of the elements 61S and 62S in FIG. 33A). The resistancesof the SAF elements 63S and 64S increase by a constant valueirrespective of the intensity of the external magnetic field Hx (asindicated by the broken line in the graph of the elements 63S and 64S inFIG. 33A). Consequently, the output VoxSAF of the second X-axis magneticsensor 50X2 increases by a constant value irrespective of the intensityof the external magnetic field Hx, as indicated by the broken line inFIG. 33B. In this instance, both the output VoxConv of the first X-axismagnetic sensor 50X1 and the output VoxSAF of the second X-axis magneticsensor 50X2 decrease by a constant value. Therefore the differencebetween these two outputs (the output Vox of the X-axis magnetic sensor50X) does not vary.

(4) When a compressive stress is placed on all the elements in the firstand second regions:

The resistance of each element decreases by a constant value, and thus,the output VoxConv of the first X-axis magnetic sensor and the outputVoxSAF of the second X-axis magnetic sensor do not vary. Consequently,the output Vox of the X-axis magnetic sensor 50X does not vary.

(5) When a tensile stress is placed on all the elements in the first andsecond regions:

The resistance of each element increases by a constant value, and thus,the output VoxConv of the first X-axis magnetic sensor and the outputVoxSAF of the second X-axis magnetic sensor do not vary. Consequently,the output Vox of the X-axis magnetic sensor 50X does not vary.

As described above, the magnetic sensor 50 of the second embodiment canproduce a substantially constant output unless the external magneticfield changes, even if stresses placed on the elements vary. Thus, themagnetic sensor 50 can accurately detect magnetic fields.

Third Embodiment

A magnetic sensor according to a third embodiment of the presentinvention is different from the magnetic sensor 10 of the firstembodiment shown in FIG. 1 only in that a group comprising oneconventional GMR element (for example, the conventional GMR element 11)and one SAF element (for example, the SAF element 13) in which theconventional GMR element and the SAF element is disposed closely to eachother is replaced by a group shown in either FIG. 39 or 40. Thefollowing description will illustrate the difference.

Specifically, in the magnetic sensor of the third embodiment, a firstelement group constituted of the conventional GMR element 11 and the SAFelement 13 in the magnetic sensor 10 of the first embodiment is replacedby an element group 91 shown in FIG. 39. The element group 91 isdisposed in a position corresponding to the position on the substrate 10a shown in FIG. 1 where the first element group is disposed.

The element group 91 includes four conventional GMR elements 91 g 1 to91 g 4 and four SAF elements 91 s 1 to 91 s 4. The conventional GMRelements 91 g 1 to 91 g 4 and the SAF elements 91 s 1 to 91 s 4 eachhave the identical narrow strip shape in plan view. The longitudinaldirection of the each elements is along the Y-axis direction. Theseelements are arranged in the negative X-axis direction from the positiveedge in the X-axis direction of the substrate 10 a in this order: theconventional GMR element 91 g 1, the SAF element 91 s 1, theconventional GMR element 91 g 2, the SAF element 91 s 2, theconventional GMR element 91 g 3, the SAF element 91 s 3, theconventional GMR element 91 g 4, and the SAF element 91 s 4. Thus, theelement group 91 includes an arrangement on the substrate 10 a in whichthe conventional GMR elements (first giant magnetoresistive elements)and the SAF elements (second giant magnetoresistive elements) arealternately disposed in parallel with each other in a predetermineddirection (negative X-axis direction).

A film structure of each of the conventional GMR elements 91 g 1 to 91 g4 is the same structure as the conventional spin-valve film show in FIG.4. The magnetization of the pinned layer Pd of the fixed magnetizationlayer P in each of the conventional GMR elements 91 g 1 to 91 g 4 isfixed in the positive X-axis direction. The initial magnetization of thefree layer F in each of the conventional GMR elements 91 g 1 to 91 g 4is oriented in the positive Y-axis direction.

The negative end in Y-axis direction of the conventional GMR element 91g 1 is connected to a terminal 91 a. The positive end in the Y-axisdirection of the conventional GMR element 91 g 1 is connected to thepositive end in the Y-axis direction of the conventional GMR element 91g 2. The negative end in the Y-axis direction of the conventional GMRelement 91 g 2 is connected to the negative end in the Y-axis directionof the conventional GMR element 91 g 3. The positive end in the Y-axisdirection of the conventional GMR element 91 g 3 is connected to thepositive end in the Y-axis direction of the conventional GMR element 91g 4. The negative end in the Y-axis direction of the conventional GMRelement 91 g 4 is connected to another terminal 91 b.

Thus, a sum of the resistances of the conventional GMR elements 91 g 1to 91 g 4 is extracted from the terminals 91 a and 91 b, in place of theresistance of the conventional GMR element 11 in the magnetic sensor 10.The sum of the resistances of the conventional GMR element 91 g 1 to 91g 4 varies in the same manner as the resistance of the conventional GMRelement 11. In other words, the conventional GMR elements 91 g 1 to 91 g4 constitute a modified form of the conventional GMR element 11. Thatis, a plurality of conventional GMR elements 91 g 1 to 91 g 4 areconnected in series to form a giant magnetoresistive element (firstelement).

A film structure of each of the four SAF elements 91 s 1 to 91 s 4 isthe same structure as the synthetic spin-valve film shown in FIG. 5. Themagnetization of the pinned layer (first magnetic layer P1) of the fixedmagnetization layer P′ in each of the SAF elements 91 s 1 to 91 s 4 isfixed in the negative X-axis direction. The initial magnetization of thefree layer F in each of the SAF elements 91 s 1 to 91 s 4 is oriented inthe positive Y-axis direction.

The negative end in the Y-axis direction of the SAF element 91 s 1 isconnected to a terminal 91 c. The positive end in the Y-axis directionof the SAF element 91 s 1 is connected to the positive end in the Y-axisdirection of the SAF element 91 s 2. The negative end in the Y-axisdirection of the SAF element 91 s 2 is connected to the negative end inthe Y-axis direction of the SAF element 91 s 3. The positive end in theY-axis direction of the SAF element 91 s 3 is connected to the positiveend in the Y-axis direction of the SAF element 91 s 4. The negative endin the Y-axis direction of the SAF element 91 s 4 is connected toanother terminal 91 d.

Thus, a sum of the resistances of the SAF elements 91 s 1 to 91 s 4 isextracted from the terminals 91 c and 91 d, in place of the resistanceof the SAF element 13 in the magnetic sensor 10. The sum of theresistances of the SAF elements 91 s 1 to 91 s 4 varies in the samemanner as the resistance of the SAF element 13. In other words, the SAFelements 91 s 1 to 91 s 4 constitute a modified SAF element 13. That is,a plurality of the SAF elements 91 s 1 to 91 s 4 are connected in seriesto form another giant magnetoresistive element (second element).

Both ends of each of the conventional GMR elements 91 g 1 to 91 g 4 andSAF elements 91 s 1 to 91 s 4 are provided with bias magnet films (notshown in FIG. 39) for applying to the corresponding free layer F a biasmagnetic field oriented in the same direction as the initialmagnetization direction of the free layer F.

In the magnetic sensor of the third embodiment, also, a second elementgroup constituted of the conventional GMR element 12 and the SAF element14 in the magnetic sensor 10 of the first embodiment is replaced by anelement group having the same structure as the element group 91 shown inFIG. 39. This element group is disposed in a position corresponding tothe position on the substrate 10 a shown in FIG. 1 where the secondelement group is disposed. As described above, in the magnetic sensor ofthe third embodiment, a modified conventional GMR element 12 and amodified SAF element 14 are disposed in a position corresponding to theposition where the second element group of the magnetic sensor 10 isdisposed.

Furthermore, in the magnetic sensor of the third embodiment, a thirdelement group constituted of the conventional GMR element 21 and the SAFelement 23 in the magnetic sensor 10 of the first embodiment is replacedby an element group 92 shown in FIG. 40. The element group 92 isdisposed in a position corresponding to the position on the substrate 10a shown in FIG. 1 where the third element group is disposed.

As shown in FIG. 40, the element group 92 has the same structure as theelement group 91 shown in FIG. 39. More specifically, the element group92 includes conventional GMR elements 92 g 1 to 92 g 4 and SAF elements92 s 1 to 92 s 4. These elements each have a narrow strip shape whenviewed from above. The elements in the element group 92 extend in theX-axis direction and are connected as shown in FIG. 40. The initialmagnetizations of the free layers F and the fixed magnetizations of thepinned layers of the fixed magnetization layers P and P′ are oriented inthe directions shown in FIG. 40. Thus, the magnetic sensor of the thirdembodiment has the element group 92 in a position corresponding to theposition where the third element group is disposed in the magneticsensor 10. In other words, the element group 92 includes a modifiedconventional GMR element 21 and a modified SAF element 23.

Furthermore, in the magnetic sensor of the third embodiment, a fourthelement group constituted of the conventional GMR element 22 and the SAFelement 24 in the magnetic sensor 10 of the first embodiment is replacedby an element group having the same structure as the element group 92shown in FIG. 40. This element group is disposed in a positioncorresponding to the position on the substrate 10 a shown in FIG. 1where the fourth element group is disposed. As described above, in themagnetic sensor of the third embodiment, a modified conventional GMRelement 22 and a modified SAF element 24 are disposed in a positioncorresponding to the position where the fourth element group of themagnetic sensor 10 is disposed.

In addition, in the magnetic sensor of the third embodiment, themodified conventional GMR elements 11, 12, 21, and 22 and the modifiedSAF elements 13, 14, 23, and 24 are connected in a full-bridgeconfiguration as in the magnetic sensor 10, thereby forming an X-axismagnetic sensor and a Y-axis magnetic sensor.

In a sensor including a plurality of giant magnetoresistive elements ona single substrate as described above, a stress is placed on the giantmagnetoresistive elements by deformation of the substrate or a resincovering the giant magnetoresistive elements. It is inferred that thestress gradually varies along the surface of the substrate.

It is therefore very likely that, in a magnetic sensor having astructure as in the third embodiment, in which conventional GMR elementsconnected in series to form a first element and SAF elements connectedin series to form a second element are alternately arranged in parallelwith each other on a substrate 10 a in a predetermined direction (in thepresent embodiment, the X-axis direction or the Y-axis direction), thestress having the same magnitude is applied to both the first elementand the second element. Hence, the variations in resistance of the firstand the second element due to the stress are close.

Thus, the X-axis and the Y-axis magnetic sensor, which are formed byconnecting these elements in bridge configurations, can produce outputsless affected by stress placed on the elements. Accordingly, themagnetic sensor of the third embodiment can produce outputs lessaffected by stress placed on the elements than the output from themagnetic sensor 10 of the first embodiment, consequently detecting amagnetic field more accurately.

In the magnetic sensor (element groups 91 and 92) of the thirdembodiment, the arranging order of the elements may be changed. Forexample, the elements may be arranged in the negative X-axis directionfrom the positive edge in the X-axis direction of the substrate 10 a inthe order of: the SAF element 91 s 1, the conventional GMR element 91 g1, the SAF element 91 s 2, the conventional GMR element 91 g 2, the SAFelement 91 s 3, the conventional GMR element 91 g 3, the SAF element 91s 4, and the conventional GMR element 91 g 4, or in the negative Y-axisdirection from the positive edge in the Y-axis direction of thesubstrate 10 a in the order of: the SAF element 92 s 1, the conventionalGMR element 92 g 1, the SAF element 92 s 2, the conventional GMR element92 g 2, the SAF element 92 s 3, the conventional GMR element 92 g 3, theSAF element 92 s 4, and the conventional GMR element 92 g 4.

Further, the element groups shown in FIGS. 39 and 40 may be applied tothe magnetic sensor 50 shown in FIG. 30.

Fourth Embodiment

FIG. 41 shows a plan view of a magnetic sensor 95 according to a fourthembodiment of the present invention. The magnetic sensor 95 includes asingle substrate 95 a similar to the substrate 10 a, an X-axis magneticdetecting element group 96, and a Y-axis magnetic detecting elementgroup 97. The X-axis magnetic detecting element group 96 is disposed inthe vicinity of the positive edge in the X-axis direction of thesubstrate 95 a and in the middle position in the Y-axis direction of thesubstrate 95 a. The Y-axis magnetic detecting element group 97 isdisposed in the vicinity of the positive edge in the Y-axis direction ofthe substrate 95 a and in the middle position in the X-axis direction ofthe substrate 95 a.

The X-axis magnetic detecting element group 96 includes fourconventional GMR elements 96 g 1 to 96 g 4 and four SAF elements 96 s 1to 96 s 4, as shown in FIG. 42. The conventional GMR elements 96 g 1 to96 g 4 and the SAF elements 96 s 1 to 96 s 4 each have the same narrowstrip shape when viewed from above, and extend in the Y-axis direction.These elements are arranged in the negative X-axis direction from thepositive edge in the X-axis direction of the substrate 95 a in the orderof: the conventional GMR element 96 g 1, the conventional GMR element 96g 2, the SAF element 96 s 1, the SAF element 96 s 2, the conventionalGMR element 96 g 3, the conventional GMR element 96 g 4, the SAF element96 s 3, and the SAF element 96 s 4.

The conventional GMR elements 96 g 1 to 96 g 4 are each formed of theconventional spin-valve film shown in FIG. 4. The magnetization of thepinned layer Pd of the fixed magnetization layer P in each of theconventional GMR elements 96 g 1 to 96 g 4 is fixed in the positiveX-axis direction. The initial magnetization of the free layer F in eachof the conventional GMR elements 96 g 1 to 96 g 4 is oriented in thepositive Y-axis direction.

The negative end in the Y-axis direction of the conventional GMR element96 g 1 is connected to a terminal 96 a 1. The positive end in the Y-axisdirection of the conventional GMR element 96 g 1 is connected to thepositive end in the Y-axis direction of the conventional GMR element 96g 3. The negative end in the Y-axis direction of the conventional GMRelement 96 g 3 is connected to a terminal 96 a 2.

Thus, a sum of the resistances of the conventional GMR elements 96 g 1and 96 g 3 is extracted from the terminals 96 a 1 and 96 a 2. Theresistance extracted varies in the same manner as the resistance of theconventional GMR element 11 in the magnetic sensor 10. In other words,the conventional GMR elements 96 g 1 and 96 g 3 constitute a modifiedform of the conventional GMR element 11.

Also, the negative end in the Y-axis direction of the conventional GMRelement 96 g 2 is connected to a terminal 96 b 1. The positive end inthe Y-axis direction of the conventional GMR element 96 g 2 is connectedto the positive end in the Y-axis direction of the conventional GMRelement 96 g 4. The negative end in the Y-axis direction of theconventional GMR element 96 g 4 is connected to a terminal 96 b 2.

Thus, a sum of the resistances of the conventional GMR elements 96 g 2and 96 g 4 is extracted from the terminals 96 b 1 and 96 b 2. Theresistance extracted varies in the same manner as the resistance of theconventional GMR element 12 in the magnetic sensor 10. In other words,the conventional GMR elements 96 g 2 and 96 g 4 constitute a modifiedform of the conventional GMR element 12.

The SAF elements 96 s 1 to 96 s 4 are each formed of the syntheticspin-valve film shown in FIG. 5. The magnetization of the pinned layer(first magnetic layer P1) of the fixed magnetization layer P′ in each ofthe SAF elements 96 s 1 to 96 s 4 is fixed in the negative X-axisdirection. The initial magnetization of each free layer F in each of theSAF elements 96 s 1 to 96 s 4 is oriented in the positive Y-axisdirection.

The negative end in the Y-axis direction of the SAF element 96 s 1 isconnected to a terminal 96 c 1. The positive end in the Y-axis directionof the SAF element 96 s 1 is connected to the positive end in the Y-axisdirection of the SAF element 96 s 3. The negative end in the Y-axisdirection of the SAF element 96 s 3 is connected to a terminal 96 c 2.

Thus, a sum of the resistances of the SAF elements 96 s 1 and 96 s 3 isextracted from the terminals 96 c 1 and 96 c 2. The resistance extractedvaries in the same manner as the resistance of the SAF element 13 of themagnetic sensor 10. In other words, the SAF elements 96 s 1 and 96 s 3constitute a modified form of the SAF element 13.

Also, the negative end in the Y-axis direction of the SAF element 96 s 2is connected to a terminal 96 d 1. The positive end in the Y-axisdirection of the SAF element 96 s 2 is connected to the positive end inthe Y-axis direction of the SAF element 96 s 4. The negative end in theY-axis direction of the SAF element 96 s 4 is connected to a terminal 96d 2.

Thus, a sum of the resistances of the SAF elements 96 s 2 to 96 s 4 isextracted from the terminals 96 d 1 and 96 d 2. The resistance extractedvaries in the same manner as the resistance of the SAF element 14 in themagnetic sensor 10. In other words, the SAF elements 96 s 2 and 96 s 4constitute a modified form of the SAF element 14.

Note that both ends of each of the conventional GMR elements 96 g 1 to96 g 4 and SAF elements 96 s 1 to 96 s 4 are provided with bias magnetfilms (not shown in FIG. 42) for applying to the corresponding freelayer F a bias magnetic field oriented in the same direction as theinitial magnetization of the free layer F.

The modified forms of the conventional GMR elements 11 and 12 and SAFelements 13 and 14 are connected in a full-bridge configuration in thesame manner as the conventional GMR elements 11 and 12 and SAF elements13 and 14 in the magnetic sensor 10, thereby forming an X-axis magneticsensor.

As shown in FIG. 43, the Y-axis magnetic detecting element group 97 hasthe same structure as the X-axis magnetic detecting element group 96shown in FIG. 42. Specifically, the Y-axis magnetic detecting elementgroup 97 includes conventional GMR elements 97 g 1 to 97 g 4 and SAFelements 97 s 1 to 97 s 4. Each of these elements has a narrow stripshape when viewed from above. The elements extend in the X-axisdirection and are connected as shown in FIG. 43. The initialmagnetization of the free layers F and the fixed magnetizations of thepinned layers of the fixed magnetization layers P and P′ are oriented inthe directions shown in FIG. 43.

Thus, the conventional GMR elements 97 g 1 and 97 g 3 constitute amodified form of the conventional GMR element 21. The conventional GMRelements 97 g 2 and 97 g 4 constitute a modified form of theconventional GMR element 22. Also, the SAF elements 97 s 1 and 97 s 3constitute a modified form of the SAF element 23, and the SAF elements97 s 2 and 97 s 4 constitute a modified form of the SAF element 24.

The modified forms of the conventional GMR elements 21 and 22 and SAFelements 23 and 24 are connected in a full-bridge configuration to forma Y-axis magnetic sensor in the same manner as the conventional GMRelements 21 and 22 and the SAF elements 23 and 24 in the magnetic sensor10.

Focusing attention on, for example, the X-axis magnetic sensor in themagnetic sensor 95 of the fourth embodiment, the X-axis magnetic sensorincludes four conventional GMR elements and four SAF elements. Twoconventional GMR elements adjacent to each other form a first group(conventional GMR elements 96 g 1 and 96 g 2); the other twoconventional GMR elements adjacent to each other form a second group(conventional GMR elements 96 g 3 and 96 g 4); two SAF elements adjacentto each other form a third group (SAF elements 96 s 1 and 96 s 2); theother two SAF elements adjacent to each other form a fourth group (SAFelements 96 s 3 and 96 s 4). These four groups are disposed on thesubstrate 10 a in parallel with each other in a predetermined direction(negative X-axis direction, in this instance) in the order of: the firstgroup, the third group, the second group, and the fourth group (or thethird group, the first group, the fourth group, and the second group).

In the X-axis magnetic sensor, two conventional GMR elements unadjacenteach other (i.e., conventional GMR elements 96 g 1 and 96 g 3) areconnected in series to form an element (third element) constituted ofonly the conventional GMR elements, and the other two conventional GMRelements unadjacent each other (i.e., conventional GMR elements 96 g 2and 96 g 4) are connected in series to form another element (fourthelement) constituted of only the conventional GMR elements. Further, twoSAF elements unadjacent each other (i.e., SAF elements 96 s 1 and 96 s3) are connected in series to form another element (fifth element)constituted of only the SAF elements, and the other two SAF elementsunadjacent each other (i.e., elements 96 s 2 and 96 s 4) are connectedin series to form another element (sixth element) constituted of onlythe SAF elements.

With the structure above, it is likely that the third to sixth elementslie under stresses with magnitudes close to each other. Hence, thevariations in resistance of the third to sixth elements due to thestresses can be close. Thus, the X-axis magnetic sensor in the magneticsensor 95, which are formed by connecting the third to sixth elements ina full-bridge configuration, can produce outputs still less affected bystresses placed on the elements.

Modification

In the magnetic sensor of the present invention, for example, the SAFelement 14 and the conventional GMR element 12 may be connected in ahalf-bridge configuration to form an X-axis magnetic sensor, and thepotential at the junction T1 of the elements is extracted as the outputVox, as shown in FIG. 44A. Also, a full-bridge circuit may include fixedresistors 98 and 99, as shown in FIG. 44B, and the potential differencebetween the potential at the junction T2 and the potential at thejunction T3 is extracted as the output Vox of the X-axis magneticsensor.

In another modification, for example, fixed resistors may berespectively disposed in series between the SAF element 13 and thejunction Q1 and between the SAF element 14 and the junction Q2, in thecircuit shown in FIG. 6.

Fifth Embodiment Structure of Magnetic Sensor

FIG. 49 is a plan view of a magnetic sensor 210 according to a fifthembodiment of the present invention. The magnetic sensor 210 includesthe same single substrate (monolithic chip) 210 a as the substrate 10 aused in the foregoing embodiments and a total of eight giantmagnetoresistive elements 211 to 214 and 221 to 224. The magnetic sensor210 is referred to as an “N-type magnetic sensor 210” for the sake ofconvenience.

The giant magnetoresistive elements 211, 212, 221, and 222 are theabove-described conventional GMR elements. The giant magnetoresistiveelements 213, 214, 223, and 224 are the above-described SAF elements.The SAF elements 213, 214, 223, and 224 is formed over (i.e., overlap,overlie, lap over) the conventional GMR elements 211, 212, 221, and 222,respectively, as described in detail later. Note that, two elements ineach solid line circle shown in FIG. 49 (for example, the elements 211and 213) overlap each other in the direction perpendicular to the mainsurface of the substrate 210 a (Z-axis direction).

In the present embodiment as well, the giant magnetoresistive elements211, 212, 213, and 214 may be referred to as a first, a second, a third,and a fourth X-axis magnetic detecting element, respectively; the giantmagnetoresistive elements 221, 222, 223, and 224 may be referred to as afirst, a second, a third, and a fourth Y-axis magnetic detectingelement, respectively.

The conventional GMR element 211 and the SAF element 213 constitute asixth element group G6; the conventional GMR element 212 and the SAFelement 214 constitute a seventh element group G7; the conventional GMRelement 221 and the SAF element 223 constitute a eighth element groupG8; and the conventional GMR element 222 and the SAF element 224constitute a ninth element group G9. The sixth to ninth element groupsG6 to G9 have substantially the same structure, except for theirpositions on the substrate 210 a. Therefore, the following descriptionillustrates the structure of the sixth element group G6 as arepresentative example.

FIG. 50 is an enlarged plan view of the conventional GMR element 211.The conventional GMR element 211 includes a plurality (6 in this case)of narrow strip-shaped portions 211 a 1 to 211 a 6, a plurality (7 inthis case) of bias magnet films 211 b 1 to 211 b 7, and a pair ofterminals 211 c 1 and 211 c 2.

The narrow strip-shaped portions 211 a 1 to 211 a 6 each extend in theY-axis direction, and they are disposed in parallel in the negativeX-axis direction from the narrow strip-shaped portion 211 a 1 positionedat the most positive position in the X-axis direction. The positive endin the Y-axis direction of this narrow strip-shaped portion 211 a 1 isformed on a bias magnet film 211 b 1. The bias magnet film 211 b 1 isconnected to the terminal 211 c 1. The negative end in the Y-axisdirection of the narrow strip-shaped portion 211 a 1 is formed on a biasmagnet film 211 b 2.

The negative and the positive ends in the Y-axis direction of the narrowstrip-shaped portion 211 a 2 are formed on the bias magnet films 211 b 2and 211 b 3, respectively. The negative end in the Y-axis direction ofthe narrow strip-shaped portion 211 a 2 is connected to the negative endin the Y-axis direction of the narrow strip-shaped portion 211 a 1 onthe bias magnet film 211 b 2. The positive and the negative ends in theY-axis direction of the narrow strip-shaped portion 211 a 3 are formedon the bias magnet films 211 b 3 and 211 b 4, respectively. The positiveend in the Y-axis direction of the narrow strip-shaped portion 211 a 3is connected to the positive end in the Y-axis direction of the narrowstrip-shaped portion 211 a 2 on the bias magnet film 211 b 3.

The negative and the positive ends in the Y-axis direction of the narrowstrip-shaped portion 211 a 4 are formed on the bias magnet films 211 b 4and 211 b 5, respectively. The negative end in the Y-axis direction ofthe narrow strip-shaped portion 211 a 4 is connected to the negative endin the Y-axis direction of the narrow strip-shaped portion 211 a 3 onthe bias magnet film 211 b 4. The positive and the negative ends in theY-axis direction of the narrow strip-shaped portion 211 a 5 are formedon the bias magnet films 211 b 5 and 211 b 6, respectively. The positiveend in the Y-axis direction of the narrow strip-shaped portion 211 a 5is connected to the positive end in the Y-axis direction of the narrowstrip-shaped portion 211 a 4 on the bias magnet film 211 b 5.

The negative and the positive ends in the Y-axis direction of the narrowstrip-shaped portion 211 a 6 are formed on the bias magnet film 211 b 6and 211 b 7, respectively. The negative end in the Y-axis direction ofthe narrow strip-shaped portion 211 a 6 is connected to the negative endin the Y-axis direction of the narrow strip-shaped portion 211 a 5 onthe bias magnet film 211 b 6. The bias magnet film 211 b 7 is connectedto the terminal 211 c 2. Thus, the conventional GMR element 211 isformed of the plurality of narrow strip-shaped portions connected inseries in a serpentine manner. In FIG. 50, the dotted-chain line CL21indicates the centerline running through the center in the Y-axisdirection of each narrow strip-shaped portion.

Each of the narrow strip-shaped portions 211 a 1 to 211 a 6 is formed ofthe conventional spin-valve film shown in FIG. 4A. Since the narrowstrip-shaped portions 211 a 1 to 211 a 6 extend in the Y-axis direction,the free layer F of this spin-valve film extends in the Y-axisdirection. Consequently, the initial magnetization of the free layer Fwhen no external magnetic field is applied to the free layer F isoriented in the longitudinal direction of the free layer F (positiveY-axis direction for the conventional GMR element 211) by shapeanisotropy.

The bias magnet films 211 b 1 to 211 b 7 are formed by a permanentmagnet film (hard magnet film) made of the same hard ferromagneticmaterial as the bias magnet films 11 b 1 to 11 b 7. The bias magnetfilms 211 b 1 to 211 b 7 are magnetically coupled with free layers Fdirectly overlying the bias magnet films to apply a bias magnetic fieldto the free layers F in their longitudinal direction (positive Y-axisdirection for the conventional GMR element 211).

Thus, a sum of the resistances of the narrow strip-shaped portions 211 a1 to 211 a 6 is extracted as the resistance of the conventional GMRelement 211 from the terminals 211 c 1 and 211 c 2. Consequently, theresistance of the conventional GMR element 211 varies as shown in FIG.4B and FIG. 4C, in the same manner as the conventional GMR element 11.More specifically, as the intensity of the external magnetic field inthe positive X-axis direction increases, the resistance decreases.

The SAF element 213 has such a form as the conventional GMR element 211folded back at the centerline CL21 (substantially the same form as theform of the conventional GMR element 211), as shown in FIG. 51. In otherwords, the SAF element 213 and the conventional GMR element 211 aresymmetrical with respect to the centerline CL21.

More specifically, the SAF element 213 includes a plurality (6 in thiscase) of narrow strip-shaped portions 213 a 1 to 213 a 6, a plurality (7in this case) of bias magnet films 213 b 1 to 213 b 7, and a pair ofterminals 213 c 1 and 213 c 2.

The narrow strip-shaped portions 213 a 1 to 213 a 6 each extend in theY-axis direction, and they are disposed in parallel in the negativeX-axis direction from the narrow strip-shaped portion 213 a 1 lying atthe most positive position in the X-axis direction. The negative end inthe Y-axis direction of the narrow strip-shaped portion 213 a 1 isformed on the bias magnet film 213 b 1. The bias magnet film 213 b 1 isconnected to the terminal 213 c 1. The positive end in the Y-axisdirection of the narrow strip-shaped portion 213 a 1 is formed on thebias magnet film 213 b 2.

The positive and the negative ends in the Y-axis direction of the narrowstrip-shaped portion 213 a 2 are formed on the bias magnet films 213 b 2and 213 b 3, respectively. The positive end in the Y-axis direction ofthe narrow strip-shaped portion 213 a 2 is connected to the positive endin the Y-axis direction of the narrow strip-shaped portion 213 a 1 onthe bias magnet film 213 b 2. The negative and the positive end in theY-axis direction of the narrow strip-shaped portion 213 a 3 are formedon the bias magnet films 213 b 3 and 213 b 4, respectively. The negativeend in the Y-axis direction of the narrow strip-shaped portion 213 a 3is connected to the negative end in the Y-axis direction of the narrowstrip-shaped portion 213 a 2 on the bias magnet film 213 b 3.

The positive and the negative ends in the Y-axis direction of the narrowstrip-shaped portion 213 a 4 are formed on the bias magnet films 213 b 4and 213 b 5, respectively. The positive end in the Y-axis direction ofthe narrow strip-shaped portion 213 a 4 is connected to the positive endin the Y-axis direction of the narrow strip-shaped portion 213 a 3 onthe bias magnet film 213 b 4. The negative and the positive end in theY-axis direction of the narrow strip-shaped portion 213 a 5 are formedon the bias magnet films 213 b 5 and 213 b 6, respectively. The negativeend in the Y-axis direction of the narrow strip-shaped portion 213 a 5is connected to the negative end in the Y-axis direction of the narrowstrip-shaped portion 213 a 4 on the bias magnet film 213 b 5.

The positive and the negative ends in the Y-axis direction of the narrowstrip-shaped portion 213 a 6 are formed in the bias magnet films 213 b 6and 213 b 7. The positive end in the Y-axis direction of the narrowstrip-shaped portion 213 a 6 is connected to the positive end in theY-axis direction of the narrow strip-shaped portion 213 a 5 on the biasmagnet film 213 b 6. The bias magnet film 213 b 7 is connected to theterminal 213 c 2. Thus, the SAF element 213 is formed of the pluralityof narrow strip-shaped portions connected in series in a serpentinemanner.

Dotted-chain line CL22 shown in FIG. 51 indicates the centerline runningthrough the centers in the Y-axis direction of the narrow strip-shapedportions. The SAF element 213 substantially overlies (or underlies) theconventional GMR element 211 so that its centerline CL22 aligns with thecenterline CL21 of the conventional GMR element 211, as shown in FIG. 52and FIG. 53, which is a sectional view of the SAF element 213 takenalong line LIII-LIII in FIG. 52. As shown in FIG. 53, an insulatinglayer is provided between the conventional GMR element 211 and the SAFelement 213.

The SAF element 213 is formed of a synthetic spin-valve film having thestructure shown in FIG. 5A. The synthetic spin-valve film includes afree layer F, a spacer layer S overlying the free layer F, a fixedmagnetization layer P′ overlying the spacer layer S, and a protectivelayer (capping layer) C overlying the fixed magnetization layer P′.

The SAF element 213 having the above-described structure has aresistance varying in response to an external magnetic field H changingin the range of −Hc to +Hc along the fixed magnetization direction ofthe first ferromagnetic layer (pinned layer) P1 in the fixedmagnetization layer P′ (resistance increasing as the intensity of theexternal magnetic field H in the positive X-axis direction increasing),as shown in FIG. 5C.

Referring back to FIG. 49, the sixth element group G6 including theconventional GMR element 211 and the SAF element 213 is disposed in thevicinity of the positive edge in the X-axis direction of the substrate210 a and in an upper-middle position in the Y-axis direction. Amagnetic-field-detecting direction of the conventional GMR element 211is in the negative X-axis direction. A magnetic-field-detectingdirection of the SAF element 213 is in the positive X-axis direction.The seventh element group G7 including the conventional GMR element 212and the SAF element 214 is disposed in the vicinity of the positive edgein the X-axis direction of the substrate 210 a and in the lower-middleposition in the Y-axis direction. A magnetic-field-detecting directionof the conventional GMR element 212 is in the negative X-axis direction.A magnetic-field-detecting direction of the SAF element 214 is in thepositive X-axis direction. As described, the sixth element group G6 andthe seventh element group G7 are disposed close to each other in thevicinity of the positive edge in the X-axis direction of the substrate210 a (in a first small region).

The eighth element group G8 including the conventional GMR element 221and the SAF element 223 is disposed in the positive edge in the Y-axisdirection of the substrate 210 a and in a left-middle position in theX-axis direction. A magnetic-field-detecting direction of theconventional GMR element 221 is in the negative Y-axis direction. Amagnetic-field-detecting direction of the SAF element 223 is in thepositive Y-axis direction. The ninth element group G9 including theconventional GMR element 222 and the SAF element 224 is disposed in thevicinity of the positive edge in the Y-axis direction of the substrate210 a and in a right-middle position in the X-axis direction. Amagnetic-field-detecting direction of the conventional GMR element 222is in the negative Y-axis direction. A magnetic-field-detectingdirection of the SAF element 224 is in the positive Y-axis direction. Asdescribed, the eighth element group G8 and the ninth element group G9are disposed close to each other in the vicinity of the positive edge inthe Y-axis direction of the substrate 210 a (second small region at apredetermined distant from the first small region).

The magnetic sensor 210 includes an X-axis magnetic sensor (whosemagnetic-field-detecting direction is in the X-axis direction)constituted of the elements 211 to 214 and a Y-axis magnetic sensor(whose magnetic-field-detecting direction is in the Y-axis direction)constituted of the elements 221 to 224.

As shown in the equivalent circuit in FIG. 54A, the X-axis magneticsensor includes the elements 211 to 214 connected in a full-bridgeconfiguration with conducting wires (not shown in FIG. 49). The elements211 to 214 are connected in the same manner as the elements 11 to 14shown in FIG. 6. The potential difference Vox (=VQ2−VQ1) between thepotential VQ1 at the junction Q1 where the conventional GMR element 211is connected to the SAF element 213 and the potential VQ2 at thejunction Q2 where the conventional GMR element 212 is connected to theSAF element 214 is extracted as the output (first output) from theX-axis magnetic sensor. Consequently, the X-axis magnetic sensor outputsa voltage Vox that is substantially proportional to an external magneticfield Hx changing along the X axis and that decreases as the externalmagnetic field Hx increases, as shown in FIG. 54B.

As shown in the equivalent circuit in FIG. 55A, the Y-axis magneticsensor includes the elements 221 to 224 connected in a full-bridgeconfiguration with conducting wires (not shown in FIG. 49). The elements221 to 224 are connected in the same manner as the elements 21 to 24shown in FIG. 7. The potential difference Voy (=VQ3−VQ4) between thepotential VQ3 at the junction Q3 where the conventional GMR element 221is connected to the SAF element 223 and the potential VQ4 at thejunction Q4 where the conventional GMR element 222 is connected to theSAF element 224 is extracted as the output (second output) of the Y-axismagnetic sensor. Consequently, the Y-axis magnetic sensor outputs avoltage Voy that is substantially proportional to an external magneticfield Hy changing along the Y axis and that increases as the externalmagnetic field Hy increases, as shown in FIG. 55B.

Method for Manufacturing Magnetic Sensor 210—Fixing of MagnetizationDirection of Pinned Layer

A method will now be described for forming the elements 211 to 214 and221 to 224 (for fixing the magnetization of the pinned layer). First, aplurality of films M intended to act as the elements 211 to 214 and 221to 224 are formed in an island-shaped manner on a substrate 210 a-1 thatis to act as the substrate 210 a, as shown in plan view in FIG. 56.These films M are disposed so that when the substrate 210 a-1 is cutalong the dotted-chain lines CL in FIG. 56 into a plurality of magneticsensors 210 shown in FIG. 49 in a cutting step, the elements 211 to 214and 221 to 224 are arranged on the substrate 210 a as shown in FIG. 49.How these films M are formed will be described later.

Then, a magnet array 30 shown in FIGS. 9 and 10 is prepared. In thepresent embodiment as well, magnetic fields generated over the permanentmagnets 31 are used for fixing the magnetization directions of thepinned layers in the elements 211 to 214 and 221 to 224, as shown inFIG. 57.

The substrate 210 a-1 having the films M is disposed over the magnetarray 30. Specifically, the substrate 210 a-1 and the magnet array 30are disposed with a relative positional relationship such that twoadjacent edges of each square formed by cutting the substrate 210 a-1along lines CL, not having the films M adjacent thereto, and theirintersection are aligned with two adjacent edges and their intersectionof the corresponding permanent magnet, as shown in the plan view in FIG.58. Thus, each film M is exposed to a magnetic field oriented in thedirection perpendicular to the longitudinal direction of the narrowstrip-shaped portion of the film M, as indicated by the arrows in FIGS.57 and 58.

Then, such a set of the substrate 210 a-1 and the magnet array 30 isheated to 250 to 280° C. in a vacuum and subsequently allowed to standfor about 4 hours for magnetic field heat treatment. Consequently, themagnetization directions of the fixed magnetization layers P (pinnedlayers Pd) of the conventional GMR elements and the fixed magnetizationlayers P′ (pinned layers P1) of the SAF elements are fixed.

By the steps described above, as shown in FIG. 59, a magnetic fieldoriented in a single direction is applied to a pair of the film M3intended to act as the conventional GMR element and the film M4 intendedto act as the SAF element, which are disposed one over the other (i.e.,overlap each other), during the magnetic field heat treatment.Consequently, two of giant magnetoresistive elements, whosemagnetic-field-detecting directions are antiparallel each other, areobtained. This is because the magnetization of the pinned layer Pd (CoFemagnetic layer) of the fixed magnetization layer P in the film intendedto become a conventional GMR element and the magnetization of the secondferromagnetic layer P2 of the fixed magnetization layer P′ in the filmintended to become a SAF element are fixed in the same direction eachother, while the magnetization of the first ferromagnetic layer P1 ofthe fixed magnetization layer P′ is oriented in the antiparalleldirection to the magnetization direction of the second ferromagneticlayer P2.

Thus, this technique can also provide at least two giantmagnetoresistive elements arranged in a very small area, havingantiparallel magnetic-field-detecting directions each other.

In practice, after the magnetic field heat treatment, the substrate 210a-1 having the films is subjected to necessary treatment, includingpolarization of the bias magnet films, and is cut along lines CL shownin FIG. 58. As a result, a plurality of magnetic sensors 210 shown inFIG. 49 and a plurality of magnetic sensors 240 shown in FIG. 60 aresimultaneously manufactured.

The magnetic sensor 240 is referred to as “S-type magnetic sensor 240”for the sake of convenience. The magnetic sensor 240 includes giantmagnetoresistive elements 241 to 244 and 246 to 249. The elements 241,242, 246, and 247 are conventional GMR elements; and the elements 243,244, 248, and 249 are SAF elements. The SAF elements 243, 244, 248, and249 overlie the conventional GMR element 241, 242, 246, and 247,respectively. The initial magnetizations of the free layers in theseelements and the fixed magnetizations of the pinned layers(ferromagnetic layers adjoining the spacer layers), whose directions areantiparallel to the magnetic-field-detecting directions, are oriented asshown in FIG. 60. Two elements in each solid line circle shown in FIG.60 (for example, the elements 241 and 243) overlap each other in thedirection perpendicular to the main surface of the substrate 210 a(Z-axis direction).

The elements 241, 242, 243, and 244 are referred to as a first, asecond, a third, and a fourth X-axis magnetic detecting element,respectively. These X-axis magnetic detecting elements are connected ina full-bridge configuration to form an X-axis magnetic sensor, as in theelements 211, 212, 213, and 214 of the magnetic sensor 210. Similarly,the elements 246, 247, 248, and 249 are referred to as a first, asecond, a third, and a fourth Y-axis magnetic detecting element,respectively. These Y-axis magnetic detecting elements are connected ina full-bridge configuration to form a Y-axis magnetic sensor, as in theelements 221, 222, 223, and 224 of the magnetic sensor 210.

Method for Forming Films M

A method (film formation step) for forming the films M (intended to actas the conventional GMR elements and the SAF element) will now bedescribed.

Step 31: A substrate 210 a is prepared as shown in FIG. 61A. Thesubstrate 210 a has an insulating/wiring layer including wires 210 a 1used for the bridge configuration and an insulating layer 210 a 2covering the wires 210 a 1. The insulating layer 210 a 2 has via holesVIA used for electrical connection. The wire 210 a 1 is partiallyexposed at the bottoms of the via holes VIA.

Step 32: Referring to FIG. 61B, a layer 211 b intended to become thebias magnet films (CoCrPt layer for forming the bias magnet films 211 b1 to 211 b 7) is formed on the substrate 210 a by sputtering.

Step 33: Referring to FIG. 61C, a resist layer R1 is formed on the uppersurface of the CoCrPt layer 211 b. The resist layer R1 is patterned soas to cover only necessary regions of the CoCrPt layer 211 b for thebias magnet films. In other words, the resist layer R1 is formed into aresist mask.

Step 34: Referring to FIG. 62A, unnecessary regions of the CoCrPt layer211 b for the bias magnet films are removed by ion milling.

Step 35: Referring to FIG. 62B, the resist layer R1 is removed.

Step 36: Referring to FIG. 62C, a composite layer 211 a as shown in FIG.4A intended to become the conventional GMR elements (layer for formingthe narrow strip-shaped portions 211 a 1 to 211 a 6) is formed over theupper surface of the substrate 210 a.

Step 37: Referring to FIG. 63A, a resist layer R2 is formed on the uppersurface of the composite layer 211 a and subsequently patterned so as tocover only necessary regions of the composite layer 211 a for formingthe conventional GMR elements. In other words, the resist layer R2 isformed into a resist mask.

Step 38: Referring to FIG. 63B, unnecessary regions of the compositelayer 211 a are removed by ion milling.

Step 39: Referring to FIG. 63C, the resist layer R2 is removed.

Step 40: Referring to FIG. 64A, a SiN insulating interlayer IN is formedon the upper surface over the substrate 210 a by chemical vapordeposition (CVD). Alternatively, the insulating interlayer IN may beformed of SiO₂.

Step 41: Referring to FIG. 64B, a resist layer R3 is formed over theupper surface of the insulating interlayer IN except regions where viaholes VIA should be formed. In other words, the resist layer R3 servesas a resist mask.

Step 42: Referring to FIG. 64C, unnecessary regions of the insulatinginterlayer IN are removed by ion milling, thereby forming via holes VIA.

Step 43: Referring to FIG. 65A, the resist layer R3 is removed.

Step 44: Referring to FIG. 65B, a layer 213 b intended to become thebias magnet films (CoCrPt layer for forming the bias magnet films 213 b1 to 213 b 7) is formed on the upper surface over the substrate 210 a bysputtering.

Step 45: Referring to FIG. 65C, a resist layer R4 is formed on the uppersurface of the CoCrPt layer 213 b. The resist layer R4 is patterned soas to cover only necessary regions of the CoCrPt layer 213 b for thebias magnet films. In other words, the resist layer R4 is formed into aresist mask.

Step 46: Referring to FIG. 66A, unnecessary regions of the CoCrPt layer213 b for the bias magnet films are removed by ion milling.

Step 47: Referring to FIG. 66B, the resist layer R4 is removed.

Step 48: Referring to FIG. 66C, a composite layer 213 a intended tobecome the SAF elements shown in FIG. 5A (layer for forming the narrowstrip-shaped portions 213 a 1 to 213 a 6) is formed on the upper surfaceover the substrate 210 a.

Step 49: Referring to FIG. 67A, a resist layer R5 is formed on the uppersurface of the composite layer 213 a and subsequently patterned so as tocover necessary regions of the composite layer 213 a for forming the SAFelements. In other words, the resist layer R5 is formed into a resistmask.

Step 50: Referring to FIG. 67B, unnecessary regions of the SAF elementcomposite layer 213 a is removed by ion milling.

Step 51: Referring to FIG. 67C, the resist layer R5 is removed.

Thus, composite films 211 a and 213 a respectively intended to act asthe conventional normal GMR elements and the SAF elements are formed oneover the other (are formed to overlap each other). Then, theabove-described magnetic field heat treatment is performed.

Although the films intended to act as the conventional GMR elements areformed before the films intended to act as the SAF elements in the abovemethod, the films intended to act as the SAF elements may be formedbefore the films intended to act as the conventional GMR elements isformed.

As described above, the above method includes: the film forming step(Steps 31 to 51) of forming a composite layer 211 a (films) intended toact as the conventional GMR elements being the first giantmagnetoresistive elements and a composite layer 213 a intended to act asthe SAF elements being the second giant magnetoresistive elements on thesubstrate 210 a (more precisely, on the substrate 210 a-1 to be thesubstrate 210 a); and the magnetic field heat treatment for applying amagnetic field oriented in a single direction to the films at a hightemperature to fix the magnetization directions of the pinned layers inthe films.

This magnetic field heat treatment step easily fixes the magnetizationof the pinned layer of the fixed magnetization layer in eachconventional GMR element (for example, the conventional GMR element 211)and the magnetization of the pinned layer of the fixed magnetizationlayer in each SAF element (for example, the SAF element 213) indirections antiparallel to each other. Thus, two of giantmagnetoresistive elements having magnetic-field-detecting directionsantiparallel to each other can easily be manufactured on a singlesubstrate.

In addition, the magnetic field heat treatment uses magnetic fieldsgenerated from a magnet array 30. Accordingly, a large number ofmagnetic sensors can be efficiently manufactured at one time, and giantmagnetoresistive elements and a magnetic sensor detecting two directionsperpendicular to each other, such as the X-axis and the Y-axisdirection, can be easily achieved.

Furthermore, the film forming step includes the sub steps of:

forming (depositing) a layer (first bias magnet layer) 211 b intended tobecome the bias magnet films on a substrate (Step 32);

removing unnecessary regions of the first bias magnet layer 211 b (Steps33 to 35);

forming (depositing) a first composite layer intended to become eitherfirst giant magnetoresistive elements (conventional GMR elements) orsecond giant magnetoresistive elements (SAF elements) on the substrate(Step 36);

removing unnecessary regions of the first composite layer (Steps 37 to39);

covering (coating) the first composite layer with an insulating layer INafter the unnecessary regions of the first composite layer are removed(Step 40);

removing unnecessary regions of the insulating layer IN to form viaholes VIA (Step 41 to 43);

forming (depositing) a layer (second bias magnet layer) 213 b intendedto become the bias magnet films on the insulating layer IN (Step 44);

removing unnecessary regions of the second bias magnet layer 213 b(Steps 45 to 47);

forming (depositing) a second composite layer intended to become theother giant magnetoresistive elements over the insulating layer IN andthe via holes VIA (Step 48); and

removing unnecessary regions of the second composite layer (Steps 49 to51).

By the method described above, films intended to act as the conventionalGMR elements and the SAF elements are formed on a single substratewithout a break (in a continuous fashion).

As described above, the magnetic sensor 210 has on a single substrate210 a the conventional GMR element and SAF element that lie one over theother (overlap each other) in the vertical direction (i.e., a directionperpendicular to the main surface of the substrate). Therefore, bysimply applying a magnetic field oriented in a single direction to theseelements, the resulting magnetic sensor 210 can have elements whosemagnetic-field-detecting directions are antiparallel to each other anddisposed in a small region. Hence, the magnetic sensor 210 can be verysmall.

The giant magnetoresistive elements 211 to 214 and 221 to 224 formed onthe substrate 210 a of the magnetic sensor 210 are coated with a resinfilm and the like. Therefore, if the substrate 210 a or the resin filmis deformed by heat or external stress, the giant magnetoresistiveelements 211 to 214 and 221 to 224 are also deformed by the heat or thestress accordingly and their resistances are varied. Consequently, thebridge circuit of a magnetic sensor in which the giant magnetoresistiveelements are connected in a bridge configuration, as in the magneticsensor 210, loses its balance and the output is varied by the stress.Thus, such a magnetic sensor cannot accurately detect the intensity ofexternal magnetic fields.

In the magnetic sensor 210, however, the giant magnetoresistive elements211 to 214 (or giant magnetoresistive elements 221 to 224) forming afull-bridge circuit are disposed in a small area on the substrate 210 a,and a stress (for example, tensile stress or compressive stress) isalmost uniformly placed on these elements. The resistances of the giantmagnetoresistive elements therefore evenly increase or decrease.Accordingly, the possibility of losing the balance of the bridge circuitcan be reduced. Thus, the magnetic sensor 210 can accurately detectmagnetic fields.

Sixth Embodiment

A magnetic sensor according to a sixth embodiment of the presentinvention will now be described. FIG. 68 shows an enlarged plan view ofthe magnetic sensor of the sixth embodiment. In the magnetic sensor, theconventional GMR element and the SAF element overlap each other (lie oneover the other) in such a manner that the narrow strip-shaped portionsof the conventional GMR element intersect with the narrow strip-shapedportions of the SAF element when viewed from above.

More specifically, the magnetic sensor of the sixth embodiment includessixth to ninth element groups G6′ to G9′, which are substituted for thesixth to ninth element groups G6 to G9 of the magnetic sensor 210 of thefifth embodiment. The sixth to ninth element groups G6′ to G9′ havesubstantially the same structure, except for their positions on thesubstrate 210 a. The following description illustrates the structure ofthe sixth element group G6′ as a representative example.

The conventional GMR element 211′ of the sixth element group G6′includes a plurality (4 in this case) of narrow strip-shaped portions211 a 1′ to 211 a 4′, a plurality (5 in this case) of bias magnet films211 b 1′ to 211 b 5′, and a pair of terminals 211 c 1′ and 211 c 2′, asshown in FIG. 68.

The narrow strip-shaped portion 211 a 1′ lies at the most positiveposition in the X-axis direction among the narrow strip-shaped portions211 a 1′ to 211 a 4′. The narrow strip-shaped portion 211 a 1′ extendsin a direction rotated clockwise at an acute angle θ with respect to thepositive X-axis direction. The positive end in the Y-axis direction ofthe narrow strip-shaped portion 211 a 1′ is formed on the bias magnetfilm 211 b 1′. The bias magnet film 211 b 1′ is connected to theterminal 211 c 1′. The negative end in the Y-axis direction of thenarrow strip-shaped portion 211 a 1′ is formed on the bias magnet film211 b 2′.

Another narrow strip-shaped portion 211 a 2′ is adjacent to the narrowstrip-shaped portion 211 a 1′. The narrow strip-shaped portion 211 a 2′extends in a direction rotated counterclockwise at the acute angle θwith respect to the positive X-axis direction. The negative and thepositive ends in the Y-axis direction of the narrow strip-shaped portion211 a 2′ are formed on the bias magnet films 211 b 2′ and 211 b 3′,respectively. The negative end in the Y-axis direction of the narrowstrip-shaped portion 211 a 2′ is connected to the negative end in theY-axis direction of the narrow strip-shaped portion 211 a 1′ on the biasmagnet film 211 b 2′.

Another narrow strip-shaped portion 211 a 3′ is adjacent to the narrowstrip-shaped portion 211 a 2′. The narrow strip-shaped portion 211 a 3′extends in a direction rotated clockwise at the acute angle θ withrespect to the positive X-axis direction. The positive and the negativeends in the Y-axis direction of the narrow strip-shaped portion 211 a 3′are formed on the bias magnet films 211 b 3′ and 211 b 4′, respectively.The positive end in the Y-axis direction of the narrow strip-shapedportion 211 a 3′ is connected to the positive end in the Y-axisdirection of the narrow strip-shaped portion 211 a 2′ on the bias magnetfilm 211 b 3′.

Another narrow strip-shaped portion 211 a 4′ is adjacent to the narrowstrip-shaped portion 211 a 3′. The narrow strip-shaped portion 211 a 4′extends in a direction rotated counterclockwise at the acute angle θwith respect to the positive X-axis direction. The negative and thepositive ends in the Y-axis direction of the narrow strip-shaped portion211 a 4′ are formed on the bias magnet films 211 b 4′ and 211 b 5′. Thenegative end in the Y-axis direction of the narrow strip-shaped portion211 a 4′ is connected to the negative end in the Y-axis direction of thenarrow strip-shaped portion 211 a 3′ on the bias magnet film 211 b 4′.The bias magnet film 211 b 5′ is connected to the terminal 211 c 2′. Asdescribed, the conventional GMR element 211′ is formed of the pluralityof narrow strip-shaped portions connected in series in a serpentinemanner.

The SAF element 213′ of the sixth element group G6′ includes a plurality(4 in this case) of narrow strip-shaped portions 213 a 1′ to 213 a 4′, aplurality (5 in this case) of bias magnet films 213 b 1′ to 213 b 5′,and a pair of terminals 213 c 1′ and 213 c 2′.

The narrow strip-shaped portion 213 a 1′ lies at the most positiveposition in the X-axis direction among the narrow strip-shaped portions213 a 1′ to 213 a 4′. The narrow strip-shaped portion 213 a 1′ extendsin a direction rotated counterclockwise at the acute angle θ withrespect to the positive X-axis direction. The negative end in the Y-axisdirection of the narrow strip-shaped portion 213 a 1′ is formed on thebias magnet film 213 b 1′. The bias magnet film 213 b 1′ is connected tothe terminal 213 c 1′. The positive end in the Y-axis direction of thenarrow strip-shaped portion 213 a 1′ is formed on the bias magnet film213 b 2′.

Another narrow strip-shaped portion 213 a 2′ is adjacent to the narrowstrip-shaped portion 213 a 1′. The narrow strip-shaped portion 213 a 2′extends in a direction rotated clockwise at the acute angle θ withrespect to the positive X-axis direction. The positive and the negativeends in the Y-axis direction of the narrow strip-shaped portion 213 a 2′are formed on the bias magnet films 213 b 2′ and 213 b 3′, respectively.The positive end in the Y-axis direction of the narrow strip-shapedportion 213 a 2′ is connected to the positive end in the Y-axisdirection of the narrow strip-shaped portion 213 a 1′ on the bias magnetfilm 213 b 2′.

Another narrow strip-shaped portion 213 a 3′ is adjacent to the narrowstrip-shaped portion 213 a 2′. The narrow strip-shaped portion 213 a 3′extends in a direction rotated counterclockwise at the acute angle θwith respect to the positive X-axis direction. The negative and thepositive end in the Y-axis direction of the narrow strip-shaped portion213 a 3′ are formed on the bias magnet films 213 b 3′ and 213 b 4′,respectively. The negative end in the Y-axis direction of the narrowstrip-shaped portion 213 a 3′ is connected to the negative end in theY-axis direction of the narrow strip-shaped portion 213 a 2′ on the biasmagnet film 213 b 3′.

Another narrow strip-shaped portion 213 a 4′ is adjacent to the narrowstrip-shaped portion 213 a 3′. The narrow strip-shaped portion 213 a 4′extends in a direction rotated clockwise at the acute angle θ withrespect to the positive X-axis direction. The positive and the negativeends in the Y-axis direction of the narrow strip-shaped portion 213 a 4′are formed on the bias magnet film 213 b 4′ and 213 b 5′, respectively.The positive end in the Y-axis direction of the narrow strip-shapedportion 213 a 4′ is connected to the positive end in the Y-axisdirection of the narrow strip-shaped portion 213 a 3′ on the bias magnetfilm 213 b 4′. The bias magnet film 213 b 5′ is connected to theterminal 213 c 2′. As described, the SAF element 213′ is formed of theplurality of narrow strip-shaped portions connected in series in aserpentine manner. The narrow strip-shaped portions of the SAF element213′ are disposed above the narrow strip-shaped portions of theconventional GMR element 211′ so as to intersect with them when viewedfrom above. The narrow strip-shaped portions of the SAF element 213′ andthe narrow strip-shaped portions of the conventional GMR element 211′are separated by an insulating layer (not shown) at least at theirintersections.

The magnetic sensor according to the sixth embodiment has theconventional GMR element and the SAF element lying one over the other inthe vertical direction (perpendicular to the main surface of thesubstrate) on the single substrate 210 a, as in the magnetic sensor 210.Therefore, by applying a magnetic field oriented in a single directionto the films intended to act as those elements, at least two giantmagnetoresistive elements having 180° different magnetic-field-detectingdirections can be easily and efficiently formed in a small area on asingle substrate. Hence, the magnetic sensor of the sixth embodiment canbe very small. Although, the sixth embodiment has described a magneticsensor in which the SAF element 213′ overlies the conventional GMRelement 211′ with an insulating layer therebetween, the conventional GMRelement 211′ may overlie the SAF element 213′ with an insulating layertherebetween.

Seventh Embodiment

A magnetic sensor according to a seventh embodiment of the presentinvention will now be described. As shown in FIG. 69, the magneticsensor 250 includes a single substrate 250 a, conventional GMR elements251G to 254G and 271G to 274G, and SAF elements 261S to 264S and 281S to284S. Two elements in each solid line circle shown in FIG. 69 (forexample, the elements 251G and 261S) lie one over the other (overlapeach other) in the direction perpendicular to the main surface of thesubstrate 210 a (Z-axis direction) with an insulating layertherebetween.

The substrate 250 a is made of a thin silicon plate having the samestructure as the substrate 10 a.

The conventional GMR elements 251G to 254G and 271G to 274G each havethe same structure as the foregoing conventional GMR element 11. The SAFelements 261S to 264S and 281S to 284S each have the same structure asthe foregoing SAF element 13.

The spin-valve film of each element (e.g., the thickness of the layersof the spin-valve film) is designed so that the elements have the sameresistance if magnetic fields with an identical intensity are applied tothe elements in their respective magnetic-field-detecting directions,and so that the resistances of the elements vary by the same amount (tothe same extent) if stresses having an identical magnitude (and anidentical direction) are respectively placed on the elements.

The conventional GMR elements 251G to 254G and 271G to 274G and the SAFelements 261S to 264S and 281S to 284S form eleventh to eighteenthelement groups shown in Tables 5 and 6. Tables 5 and 6 show thepositions of the element groups, the fixed magnetization directions ofthe pinned layers Pd if the fixed magnetization layers P of theconventional GMR elements 251G to 254G and 271G to 274G, and the fixedmagnetization directions of the first ferromagnetic layers P1 (i.e., thepinned layers) in the fixed magnetization layers P′ of the SAF elements261S to 264S and 281S to 284S, and the magnetic-field-detectingdirection of each elements. The elements in each of eleventh tofourteenth regions, shown in FIG. 69 and Table 5, lie under a uniformstress resulting from deformation of, for example, the substrate 250 a.

TABLE 5 Initial Magnetization magnetization Magnetic- direction ofdirection field- Element Pinned of free detecting group Position onsubstrate 250a Elements layer layer F direction 11th Y-axis direction:upper-middle; Conventional Negative Negative Positive group X-axisdirection: vicinity of GMR 251G X-axis Y-axis X-axis negative edge SAF261S Positive Negative Negative (in 11th region) X-axis Y-axis X-axis12th Y-axis direction: lower-middle; Conventional Negative NegativePositive group X-axis direction: vicinity of GMR 252G X-axis Y-axisX-axis negative edge SAF 262S Positive Negative Negative ((in 11thregion) X-axis Y-axis X-axis 13th Y-axis direction: upper-middle;Conventional Positive Positive Negative group X-axis direction: vicinityof GMR 253G X-axis Y-axis X-axis positive edge SAF 263S NegativePositive Positive (in 12th region) X-axis Y-axis X-axis 14th Y-axisdirection: lower-middle; Conventional Positive Positive Negative groupX-axis direction: vicinity of GMR 254G X-axis Y-axis X-axis positiveedge SAF 264S Negative Positive Positive (in 12th region) X-axis Y-axisX-axis

TABLE 6 Magnetization Initial Magnetic- direction of magnetizationfield- Element Pinned direction of detecting group Position on substrate250a Elements layer free layer F direction 15th X-axis direction:left-middle; Conventional Positive Positive Negative group Y-axisdirection: vicinity of GMR 271G Y-axis X-axis Y-axis positive edge SAF281S Negative Positive Positive (in 13th region) Y-axis X-axis Y-axis16th X-axis direction: right-middle; Conventional Positive PositiveNegative group Y-axis direction: vicinity of GMR 272G Y-axis X-axisY-axis positive edge SAF 282S Negative Positive Positive (in 13thregion) Y-axis X-axis Y-axis 17th X-axis direction: left-middle;Conventional Negative Negative Positive group Y-axis direction: vicinityof GMR 273G Y-axis X-axis Y-axis negative edge SAF 2835 PositiveNegative Negative (in 14th region) Y-axis X-axis Y-axis 18th X-axisdirection: right-middle; Conventional Negative Negative Positive groupY-axis direction: vicinity of GMR 274G Y-axis X-axis Y-axis negativeedge SAF 284S Positive Negative Negative (in 14th region) Y-axis X-axisY-axis

In the present embodiment, the conventional GMR elements and the SAFelements may be referred to as the designations shown in Table 7.

TABLE 7 Element Designation Conventional First giant GMR 251Gmagnetoresistive element SAF 261S Second giant magnetoresistive elementConventional Third giant GMR 252G magnetoresistive element SAF 262SFourth giant magnetoresistive element Conventional Fifth giant GMR 253Gmagnetoresistive element SAF 263S Sixth giant magnetoresistive elementConventional Seventh giant GMR 254G magnetoresistive element SAF 264SEighth giant magnetoresistive element Conventional Eleventh (first)giant GMR 271G magnetoresistive element SAF 281S Twelfth (second) giantmagnetoresistive element Conventional Thirteenth (third) giant GMR 272Gmagnetoresistive element SAF 282S Fourteenth (fourth) giantmagnetoresistive element Conventional Fifteenth (fifth) giant GMR 273Gmagnetoresistive element SAF 283S Sixteenth (sixth) giantmagnetoresistive element Conventional Seventeenth (seventh) giant GMR274G magnetoresistive element SAF 284S Eighteenth (eighth) giantmagnetoresistive element

The magnetic sensor 250 has an X-axis magnetic sensor 250X including afirst X-axis magnetic sensor 250X1, a second X-axis magnetic sensor250X2, and a difference circuit 250Xdif, as shown in FIG. 70.

The first X-axis magnetic sensor 250X1 includes four conventional GMRelements 251G to 254G connected in a full-bridge configuration withconducting wires (not shown in FIG. 69), as shown in the equivalentcircuit in FIG. 71A. The first X-axis magnetic sensor 250X1 is amodified form of the first X-axis magnetic sensor 50X1 shown in FIG.32A, and the conventional GMR elements 251G to 254G correspond to theconventional GMR elements 51G to 54G, respectively.

Accordingly, the first X-axis magnetic sensor 250X1 outputs thedifference VoxConv (=VQ210−VQ220) between the potential VQ210 at thejunction Q210 where the conventional GMR element 251G is connected tothe conventional GMR element 253G and the potential VQ220 at thejunction Q220 where the conventional GMR element 254G is connected tothe conventional GMR element 252G (conventional GMR element output,X-axis conventional GMR element output).

The graphs adjacent to the conventional GMR elements 251G to 254G inFIG. 71A each show the characteristics of their adjacent elements. Ineach graph, the solid line, the broken line, and the double-dotted chainline represent the changes in resistance R depending on an externalmagnetic field Hx when the conventional GMR elements are not stressed,when a tensile stress is applied to the conventional GMR elements, andwhen a compressive stress is applied to the conventional GMR elements,respectively.

When the conventional GMR elements 251G to 254G are not stressed, theoutput VoxConv of the first X-axis magnetic sensor 250X1 issubstantially proportional to the external magnetic field Hx, anddecreases as the intensity of the external magnetic field Hx increases,as shown by the solid line in FIG. 71B.

The second X-axis magnetic sensor 250X2 includes four SAF elements 261Sto 264S connected in a full-bridge configuration with conducting wires(not shown in FIG. 69), as shown in the equivalent circuit in FIG. 72A.The second X-axis magnetic sensor 250X2 is a modified form of the secondX-axis magnetic sensor 50X2 shown in FIG. 33A, and SAF elements 261S to264S correspond to the SAF elements 61S to 64S, respectively.

Accordingly, the second X-axis magnetic sensor 250X2 outputs thedifference VoxSAF (=VQ230−VQ240) between the potential VQ230 at thejunction Q230 where the SAF element 261S is connected to the SAF element263S and the potential VQ240 at the junction Q240 where the SAF element264S is connected to the SAF element 262S (SAF elements output, X-axisSAF element output).

The graphs adjacent to the SAF elements 261S to 264S in FIG. 72A eachshow the characteristics of their adjacent elements. In each graph, thesolid line, the broken line, and the double-dotted chain line representthe changes in resistance R in response to an external magnetic field Hxwhen the SAF elements are not stressed, when a tensile stress is appliedto the SAF elements, and when a compressive stress is applied to the SAFelements, respectively.

When the SAF elements 261S to 264S are not stressed, the output VoxSAFof the second X-axis magnetic sensor 250X2 is substantially proportionalto the external magnetic field Hx, and increases as the intensity of theexternal magnetic field Hx increases, as shown by the solid line in FIG.72B.

The difference circuit 250Xdif subtracts the output VoxConv of the firstX-axis magnetic sensor 250X1 from the output VoxSAF of the second X-axismagnetic sensor 250X2 and outputs the resulting difference, which isdefined as the output Vox of the X-axis magnetic sensor 250X, as shownin FIG. 70. Thus, the output Vox (X-axis output) of the magnetic sensor250 is substantially proportional to the external magnetic field Hx, andincreases as the intensity of the external magnetic field Hx increases,as shown in FIG. 73.

The magnetic sensor 250 also has a Y-axis magnetic sensor 250Y, as shownin FIG. 74. The Y-axis magnetic sensor 250Y includes a first Y-axismagnetic sensor 250Y1, a second Y-axis magnetic sensor 250Y2, and adifference circuit 250Ydif.

The first Y-axis magnetic sensor 250Y1 includes four conventional GMRelements 271G to 274G connected in a full-bridge configuration withconducting wires (not shown in FIG. 69), as shown in the equivalentcircuit in FIG. 75A. The first Y-axis magnetic sensor 250Y1 is amodified form of the first Y-axis magnetic sensor 50Y1 shown in FIG.36A, and the conventional GMR elements 271G to 274G correspond to theconventional GMR elements 71G to 74G, respectively.

Accordingly, the first Y-axis magnetic sensor 250Y1 outputs thepotential difference VoyConv (=VQ250−VQ260) between the potential VQ250at the junction Q250 where the conventional GMR element 271G isconnected to the conventional GMR element 273G and the potential VQ260at the junction Q260 where the conventional GMR element 274G isconnected to the conventional GMR element 272G (output of conventionalGMR elements, Y-axis output of conventional GMR elements).

The graphs adjacent to the conventional GMR elements 271G to 274G inFIG. 75A each show the characteristics of their adjacent elements. Ineach graph, the solid line, the broken line, and the double-dotted chainline represent the changes in resistance R in response to an externalmagnetic field Hy when the conventional GMR elements are not stressed,when a tensile stress is applied to the conventional GMR elements, andwhen a compressive stress is applied to the conventional GMR elements,respectively.

When the conventional GMR elements 271G to 274G are not stressed, theoutput VoyConv of the first Y-axis magnetic sensor 250Y1 issubstantially proportional to the external magnetic field Hy, andincreases as the intensity of the external magnetic field Hy increases,as shown by the solid line in FIG. 75B.

The second Y-axis magnetic sensor 250Y2 includes four SAF elements 281Sto 284S connected in a full-bridge configuration with conducting sires(not shown in FIG. 69), as shown in the equivalent circuit in FIG. 76A.The second Y-axis magnetic sensor 250Y2 is a modified form of the secondY-axis magnetic sensor 50Y2 shown in FIG. 37A, and the SAF elements 281Sto 284S correspond to the SAF elements 81S to 84S, respectively.

Accordingly, the second Y-axis magnetic sensor 250Y2 outputs thedifference VoySAF (=VQ270−VQ280) between the potential VQ270 at thejunction Q270 where the SAF element 281S is connected to the SAF element283S and the potential VQ280 at the junction Q280 where the SAF element284S is connected to the SAF element 282S (SAF element output, Y-axisSAF element output).

The graphs adjacent to the SAF elements 281S to 284S in FIG. 76A eachshow the characteristics of their adjacent elements. In each graph, thesolid line, the broken line, and the double-dotted chain line representthe changes in resistance R in response to an external magnetic field Hywhen the SAF elements are not stressed, when a tensile stress is appliedto the SAF elements, and when a compressive stress is applied to the SAFelements, respectively.

When the SAF elements 281S to 284S are not stressed, the output VoySAFof the second Y-axis magnetic sensor 250Y2 is substantially proportionalto the external magnetic field Hy, and decreases as the intensity of theexternal magnetic field Hy increases, as shown by the solid line in FIG.76B.

The difference circuit 250Ydif subtracts the output VoySAF of the secondY-axis magnetic sensor 250Y2 from the output VoyConv of the first Y-axismagnetic sensor 250Y1 and outputs the resulting difference, which isdefined as the output Voy of the Y-axis magnetic sensor 250Y, as shownin FIG. 74. Thus, an output Voy (Y-axis output) of the magnetic sensor250 is substantially proportional to the external magnetic field Hy, andincreases as the intensity of the external magnetic field Hy increases,as shown in FIG. 77.

The magnetic sensor 250 of the seventh embodiment operates in completelythe same manner as the magnetic sensor 50, and how the magnetic sensor250 operates is not repeatedly described. The magnetic sensor 250, aswell as the magnetic sensor 50, can produce a substantially constantoutput unless the external magnetic field is changed, even if stressesplaced on the elements are varied. Thus, the magnetic sensor 250 canaccurately detect magnetic fields. Furthermore, in the magnetic sensor250, the conventional GMR element and the SAF element (for example, theconventional GMR element 251G and the SAF element 261S) lie one over theother like, and therefore, very close stresses are applied to those twoelements overlapping each other. As a result, the magnetic sensor 250 isstill less affected by stress than the magnetic sensor 50.

Eighth Embodiment

A magnetic sensor according to eighth embodiment of the presentinvention will now be described. In the magnetic sensor of the eighthembodiment, only the sixth element group G6 (the conventional GMRelement 211 and the SAF element 213) in the magnetic sensor 210 of thefifth embodiment, shown in the FIG. 49, is provided on a substrate Sub,as shown in FIG. 78A. The SAF element 213 and the conventional GMRelement 211 are connected in a half-bridge configuration, and thepotential at the junction T1 of the elements is extracted as the outputVox of an X-axis magnetic sensor, as shown in FIG. 78B. Alternative tothe above-described perpendicular bidirectional magnetic sensors, themagnetic sensor of the present invention may be a mono-directionalmagnetic sensor including only an X-axis magnetic sensor.

Another Modification

The magnetic sensor of the present invention may have a full-bridgecircuit including fixed resistors Rfix1 and Rfix2, as shown in FIG. 79.The potential difference between the junction T2 and the junction T3 isextracted as the output Vox of an X-axis magnetic sensor.

Another Modification

The bridge circuit in the magnetic sensor may include fixed resistors.For example, in the circuit shown in FIG. 54A, fixed resistors may berespectively provided in series between the SAF element 213 and thejunction Q1 and between the SAF element 214 and the junction Q2, orbetween the SAF element 211 and the junction Q1 and between the SAFelement 212 and the junction Q2.

Another Modification

The SAF elements may be disposed under the conventional GMR element onthe substrate with an insulating layer therebetween in such a mannerthat the centerline CL22 of the narrow strip-shaped portions of each SAFelements aligns with the centerline CL21 of the narrow strip-shapedportions of each conventional GMR element.

Ninth Embodiment Structure of Magnetic Sensor

FIG. 80 is a plan view of a magnetic sensor 310 according to ninthembodiment of the present invention. The magnetic sensor 310 includesthe same single substrate (monolithic chip) 310 a as the foregoingsubstrate 10 a, an X-axis magnetic sensor 311, and a Y-axis magneticsensor 321. The magnetic sensor 310 is referred to as an “N-typemagnetic sensor 310” for the sake of convenience.

The X-axis magnetic sensor 311 detects the component in the X-axisdirection of an external magnetic field. The X-axis magnetic sensor 311is disposed on the substrate 310 a in the vicinity of the positive edgein the X-axis direction of the substrate 310 a and in a substantiallymiddle position in the Y-axis direction of the substrate 310 a. TheY-axis magnetic sensor 321 detects the component in the Y-axis directionof the external magnetic field. The Y-axis magnetic sensor 321 isdisposed on the substrate 310 a in the vicinity of the positive edge inthe Y-axis direction of the substrate 310 a and in a substantiallymiddle position in the X-axis direction of the substrate 310 a. TheY-axis magnetic sensor 321, as shown in FIG. 80, has the same structureas the X-axis magnetic sensor 311, except for lying in a state in whichthe X-axis magnetic sensor 311 is rotated counterclockwise at 90° inplan view. The following description will illustrate the X-axis magneticsensor.

X-axis magnetic sensor 311 includes four bias magnet films 312 to 315, apair of conventional GMR elements (first giant magnetoresistiveelements) 316 and 317, and a pair of SAF elements (second giantmagnetoresistive elements) 318 and 319, as shown in FIG. 81.

The bias magnet films 312 to 315 are each formed by a permanent magnetfilm (hard magnet film) made of the same hard ferromagnetic material asthe bias magnet films 11 b 1 to 11 b 7, and are polarized so that theirmagnetizations are oriented in the positive Y-axis direction. As shownin FIGS. 82 and 83, which are sectional views of the X-axis magneticsensor 311 taken long lines I-I and II-II in FIG. 81 respectively, eachof the bias magnet films 312 to 315 has slants with respect to the uppersurface (main surface) of the substrate 310 a and an upper surfaceparallel to the surface of the substrate 310 a; hence the bias magnetfilm has a trapezoidal cross section (as a vertical cross section). Theupper surfaces of the bias magnet films 312 to 315 lie (exist) in thesame plane.

As shown in FIG. 81, the bias magnet film 312 is formed in a T shapewhen viewed from above. The bias magnet film 312 is disposed in thevicinity of the positive edge in the X-axis direction of the substrate310 a and in the middle position in the Y-axis direction. The biasmagnet film 313 has a rectangular shape in plan view, and is disposed ata first distance from the bias magnet film 312 in the positive Y-axisdirection.

The bias magnet film 314 has the same T shape as the bias magnet film312 in plan view, and is disposed at a second distance, shorter than thefirst distance, from the bias magnet film 312 in the negative X-axisdirection. The bias magnet film 315 has the same rectangular shape asthe bias magnet film 313 in plan view, and is disposed at a firstdistance from the bias magnet film 312 in the negative Y-axis direction.

The conventional GMR element 316 has a narrow strip shape in plan viewand extends in the Y-axis direction, as shown in FIG. 81. As shown inFIG. 82, the conventional GMR element 316 is formed on the upper surfaceof the substrate 310 a. An end of the conventional GMR element 316 is incontact with the slant of the bias magnet film 312, and the other end isin contact with the slant of the bias magnet film 313.

The film structure of the conventional GMR element 316 is the samestructure as the conventional spin-valve film shown in FIG. 4A. A SiO₂or SiN insulating/wiring layer (not shown) may be provided between theupper surface of the substrate 310 a and the free layer F. The substrate310 a and the insulating/wiring layer may constitute a “substrate”.

The initial magnetization of the free layer F before applying anexternal magnetic field is oriented in its longitudinal direction(positive Y-axis direction for the conventional GMR element 316) byshape anisotropy.

In the conventional GMR element 316, the magnetization of the CoFemagnetic layer Pd, which adjoins the spacer layer S, of the fixedmagnetization layer P is fixed in the positive X-axis direction.Therefore, the magnetic-field-detecting direction of the conventionalGMR element 316 is in the negative X-axis direction.

The free layer F of the conventional GMR element 316 is magneticallycoupled with the bias magnet films 312 and 313 immediately underlyingboth ends of the conventional GMR element 316. Consequently, the biasmagnet films 312 and 313 apply a bias magnetic field to the free layer Fof the conventional GMR element 316 in the longitudinal direction of thefree layer F (positive Y-axis direction for the conventional GMR element316).

The conventional GMR element 317 has the same shape, structure, andcharacteristics as the conventional GMR element 316. Therefore, themagnetic-field-detecting direction of the conventional GMR element 317is in the negative X-axis direction. As shown in FIG. 83, theconventional GMR element 317 is formed on the upper surface of thesubstrate 310 a. An end of the conventional GMR element 317 is incontact with the slant of the bias magnet film 314, and the other end isin contact with the slant of the bias magnet film 315. Consequently,bias magnet films 314 and 315 apply a bias magnetic field to theconventional GMR element 317 (the free layer F of the conventional GMRelement 317) in the positive Y-axis direction.

The SAF element 318 includes a narrow strip-shaped portions extendingparallel to the Y-axis direction when viewed from above, as shown inFIG. 81. The positive end in the Y-axis direction of the SAF element 318has a slightly smaller rectangular shape than the bias magnet film 313,and lies on the upper surface of the bias magnet film 313. The negativeend in the Y-axis direction of the SAF element 318 has a slightlysmaller T shape than the bias magnet film 314, and lies on the uppersurface of the bias magnet film 314. The narrow strip-shaped portion ofthe SAF element 318 is formed on the upper surface of an insulatinglayer INS, as shown in FIGS. 81 and 83. The insulating layer INS isformed on the substrate 310 a such that its upper surface lies in thesame plane as the upper surfaces of the bias magnet films 313 and 314(and the bias magnet films 312 and 315); hence, the SAF element 318 lieson a plane defined by the upper surface of the bias magnet films 313 and314 and the upper surface of the insulating layer INS.

The film structure of the SAF element 318 is of the synthetic spin-valvefilm shown in FIG. 5A. In the SAF element 318, the magnetization of thefirst magnetic layer P1, which adjoins the spacer layer S, of the fixedmagnetization layer P′ is fixed in the negative X-axis direction. Themagnetic-field-detecting direction of the SAF element 318 therefore isin the positive X-axis direction.

The free layer F of the SAF element 318 is magnetically coupled with thebias magnet films 313 and 314 immediately underlying both ends of theSAF element 318. Consequently, the bias magnet films 313 and 314 apply abias magnetic field to the free layer F of the SAF element 318 in thelongitudinal direction of the free layer F (positive Y-axis directionfor the SAF element 318).

The SAF element 319 has the same shape, structure, and characteristicsas the SAF element 318. The magnetic-field-detecting direction of theSAF element 319 therefore is in the positive X-axis direction. As shownin FIG. 81, the SAF element 319 has a narrow strip-shaped portionparallel to the Y-axis direction when viewed from above. The positiveend in the Y-axis direction of the SAF element 319 has a slightlysmaller T shape as the bias magnet film 312, and lies on the uppersurface of the bias magnet film 312. The negative end in the Y-axisdirection of the SAF element 319 has a slightly smaller rectangularshape as the bias magnet film 315, and lies on the upper surface of thebias magnet film 315. The narrow strip-shaped portion of the SAF element319 is formed on the upper surface of the insulating layer INS, as shownin FIGS. 81 and 82. The insulating layer INS is formed on the substrate310 a so that its upper surface lies in the same plane as the uppersurfaces of the bias magnet films 312 and 315; hence, the SAF element319 lies on a plane defined by the upper surfaces of the bias magnetfilms 312 and 315 and the upper surface of the insulating layer INS.

The free layer F of the SAF element 319 is magnetically coupled with thebias magnet films 312 and 315 immediately underlying both ends of theSAF element 319. Consequently, the bias magnet films 312 and 315 apply abias magnetic field to the free layer F of the SAF element 319 in thelongitudinal direction of the free layer F (positive Y-axis directionfor the SAF element 319).

As described above, in the X-axis magnetic sensor 311, each of the biasmagnet films 312 to 315 applies a bias magnetic field to a singleconventional GMR element and a single SAF element. In other words, apair of the conventional GMR element and the SAF element receive a biasmagnetic from a common bias magnet film.

In the X-axis magnetic sensor 311, the elements 316 to 319 are connectedin a full-bridge configuration, as shown in the equivalent circuit inFIG. 84A. Then, a first potential +Vd (a constant voltage from aconstant-voltage supply not shown) is applied to the bias magnet film313 through a path not shown, and the bias magnet film 315 is grounded(connected to GND) so that a second potential (0 V) different from thefirst potential is applied to it. The difference between the potentialVout1 of the bias magnet film 312 and the potential Vout2 of the biasmagnet film 314 is extracted as the output Vox of the X-axis magneticsensor 311. Thus, the X-axis magnetic sensor 311 outputs an voltage Voxthat is substantially proportional to the component Hx in the X-axisdirection of the external magnetic field Hx and that increases as theexternal magnetic field Hx increases, as shown in FIG. 84B.

The Y-axis magnetic sensor 321 is the same as an X-axis magnetic sensorrotated counterclockwise at 90° in plan view. Hence, the Y-axis magneticsensor 321 outputs a voltage Voy that is substantially proportional tothe intensity Hy in the Y-axis direction, or the Y-axis component, ofthe external magnetic field and that increases as the external magneticfield intensity Hy increases.

Method for Manufacturing the Magnetic Sensor 310

A method for manufacturing the magnetic sensor 310 (the X-axis magneticsensor 311 and the Y-axis magnetic sensor 321) will now be described.The X-axis magnetic sensor 311 and the Y-axis magnetic sensor 321 aresimultaneously formed in the same process. The following descriptionwill illustrate how the X-axis magnetic sensor 311 is manufactured withreference to FIGS. 85 to 87. FIGS. 85 to 87 are sectional views takenalong line I-I in FIG. 81, each showing a state in course ofmanufacturing the magnetic sensor 310.

First, the substrate 310 a is prepared (substrate preparation step).Then, a layer for forming the bias magnet films 312 to 315 is deposited.Specifically, the layer for forming the bias magnet films 312 to 315 isdeposited over the entire upper surface of the substrate 310 a bysputtering, and subsequently necessary regions of the layer is maskedwith a resist layer. Then, unnecessary regions are removed by ionmilling, and thereafter the resist layer is removed. Thus, the filmsintended to act as the bias magnet films 312, 313, 315, and 314 (314 isnot shown in FIG. 85) are formed at predetermined positions.

Next, the conventional GMR elements 316 and 317 are formed.Specifically, a composite layer for forming the conventional GMRelements 316 and 317 is deposited on the entire upper surfaces of thesubstrate 310 a and of the films intended to act as bias magnet films.Thereafter, a resist layer is formed (deposited) on the upper surface ofthe composite layer, and patterned so as to cover only necessary regionsof the composite layer intended to become the conventional GMR elements316 and 317. Unnecessary regions of the composite layer are removed byion milling, and the resist layer is removed. Thus, first films intendedto act as the conventional GMR elements 316 and 317 (317 is not shown inFIG. 85) are formed at predetermined positions. These processes arereferred to as a first film forming step.

Next, as shown in FIG. 86, a SiN insulating layer INS is formed over theupper surfaces of the substrate 310 a, the films intended to act as thebias magnet films 312 to 315, and the first films intended to act as theconventional GMR elements 316 and 317 by CVD. Alternatively, theinsulating layer INS may be made of SiO₂. This step is referred to as aninsulating layer forming step.

Thereafter, the insulating layer INS is removed until the films intendedto act as the bias magnet films 312 to 315 are exposed. The surfaces ofthe films intended to act as the bias magnet films 312 to 315, theinsulating layer INS, and the ends of the first films 316 and 317 areground to be flush with each other. This step is referred to as aplanarizing step.

Next, as shown in FIG. 87, a pair of films intended to act as the SAFelements 318 and 319 are formed on the planarized surface. Specifically,a composite layer for forming the films intended to act as the SAFelements 318 and 319 is formed (deposited) over the entire planarizedsurface. Then, a resist layer is formed (deposited) on the upper surfaceof the composite layer, and patterned so as to cover only the necessaryregions of the composite layer. Thereafter, unnecessary regions of thecomposite layer are removed by ion milling, and the resist layer isremoved. Thus, second films intended to act as the SAF elements 319 and318 (318 is not shown in FIG. 87) are formed at predetermined positions.These processes are referred to as a second film forming step. Throughthe above-described steps, the films, having shapes shown in FIG. 81,which will become the X-axis magnetic sensor 311 and the Y-axis magneticsensor 321 are provided at the positions shown in FIG. 80.

In practice, plural sets of the films M which will be the X-axismagnetic sensor 311 and Y-axis magnetic sensor 321 are formed on thesubstrate 310 a-1 including plural substrates 310 a, as shown in FIG.88. In this instance, the films M are disposed on the substrate 310 a-1so as to be positioned on the substrate 310 a as shown in FIG. 80 afterthe substrate 310 a-1 is cut along line CL into magnetic sensors 310(substrates 310 a) in a cutting step described below.

Subsequently, a magnetic field oriented in a single direction is appliedto the resulting films intended to act as the conventional GMR elementsand the SAF elements at a high temperature, thereby fixing themagnetization directions of the pinned layers of the films. This step isreferred to as a magnetic field heat treatment step.

The magnetic field heat treatment step uses the magnet array 30 shown inFIGS. 9 and 10. In the present embodiment as well, magnetic fieldsgenerated over the permanent magnets 31 are used for fixing themagnetization directions of the pinned layers in the elements 316 to319, as shown in FIG. 89.

Specifically, the substrate 310 a-1 having the films M is disposed overthe magnet array 30 with a relative positional relationship such thattwo edges of each square formed by cutting the substrate 310 a-1 alonglines CL, not having the films M adjacent thereto and their intersectionare aligned with two edges and their intersection of the correspondingpermanent magnet, as shown in the plan view in FIG. 90. Thus, each filmM is exposed to a magnetic field oriented in the direction perpendicularto the longitudinal direction of the narrow strip-shaped portions of thefilm M, as indicated by the arrows in FIGS. 89 and 90.

Then, such a set of the substrate 310 a-1 and the magnet array 30 isheated to 250 to 280° C. in a vacuum and subsequently allowed to standfor about 4 hours for magnetic field heat treatment. As a result, themagnetization directions of the fixed magnetization layers P (pinnedlayers Pd) of the conventional GMR elements and the fixed magnetizationlayers P′ (pinned layers P1) of the SAF elements are fixed.

More specifically, a magnetic field oriented in a single direction isapplied to the films intended to act as the conventional GMR element andthe SAF element by the magnetic field heat treatment, as shown in FIG.91. Consequently, pairs of giant magnetoresistive elements whosemagnetic-field-detecting directions are antiparallel to each other areobtained. Thus the above-described manufacturing method according to thepresent embodiment can manufacture in a very small area a set of twoconventional GMR elements (for example, the conventional GMR elements316 and 317) whose magnetic-field-detecting direction are in thenegative X-axis direction and two SAF elements (for example, the SAFelements 318 and 319) whose magnetic-field-detecting direction are inthe positive X-axis direction.

Note that, in practice, after the magnetic field heat treatment, thesubstrate 310 a-1 having the films is subjected to necessary treatment,including polarization of the bias magnet films, and is cut along linesCL shown in FIG. 90 into a plurality of magnetic sensors 310 shown inFIG. 80 and a plurality of S-type magnetic sensors (not shown).

As described above, the X-axis magnetic sensor 311 and the Y-axismagnetic sensor 321 of the magnetic sensor 310 each have a pair ofconventional GMR elements and a pair of SAF elements connected in afull-bridge configuration. By applying a magnetic field oriented in asingle direction to a conventional GMR element and a SAF element, themagnetic-field-detecting directions of those two types of giantmagnetoresistive elements is antiparallel to each other. Thus, themagnetic sensor 310 according to the present embodiment can have “giantmagnetoresistive elements whose magnetic-field-detecting directions areantiparallel to each other” that are required to form a bridgeconfiguration, that are disposed very close to each other. Hence, themagnetic sensor 310 can be very small.

In the present embodiment, the magnetic sensor 310 includes;

a first bias magnet film (for example, bias magnet film 312) formed onthe substrate 310 a so as to be in contact with an end of a first giantmagnetoresistive element (for example, the conventional GMR element316), the first bias magnet film applying a bias magnetic field orientedin a third direction (for example, the positive Y-axis direction)substantially perpendicular to a first direction (for example, thenegative X-axis direction) to the first giant magnetoresistive element;

a second bias magnet film (for example, the bias magnet film 314) formedon the substrate 310 a so as to be in contact with an end of a secondgiant magnetoresistive element (for example, the SAF element 318), thesecond bias magnet film applying a bias magnetic field oriented in thethird direction to the second giant magnetoresistive element; and

a single third bias magnet film (common bias magnet film, the biasmagnet film 313, for example) formed on the substrate 310 a so as to bein contact with both the other end of the first giant magnetoresistiveelement and the other end of the second giant magnetoresistive element,the third bias magnet film applying a bias magnetic field oriented inthe third direction to the first giant magnetoresistive element and thesecond giant magnetoresistive element.

Further, the magnetic sensor 310 includes;

a first bias magnet film (for example, bias magnet film 313) formed onthe substrate 310 a so as to be in contact with an end of a first giantmagnetoresistive element (for example, the conventional GMR element316), the first bias magnet film applying a bias magnetic field orientedin a third direction (for example, the positive Y-axis direction)substantially perpendicular to a first direction (for example, thenegative X-axis direction) to the first giant magnetoresistive element;

a second bias magnet film (for example, the bias magnet film 315) formedon the substrate 310 a so as to be in contact with an end of a secondgiant magnetoresistive element (for example, the SAF element 319), thesecond bias magnet film applying a bias magnetic field oriented in thethird direction to the second giant magnetoresistive element; and

a single third bias magnet film (common bias magnet film, the biasmagnet film 312, for example) formed on the substrate 310 a so as to bein contact with both the other end of the first giant magnetoresistiveelement and the other end of the second giant magnetoresistive element,the third bias magnet film applying a bias magnetic field oriented inthe third direction to the first giant magnetoresistive element and thesecond giant magnetoresistive element.

As described above, in the X-axis magnetic sensor 311 or the Y-axismagnetic sensor 321 of the magnetic sensor 310, a single bias magnetfilm (any of the bias magnet films 312 to 315) is substituted for twobias magnet films, respectively required for an end of a first giantmagnetoresistive element and an end of a second giant magnetoresistiveelement. Accordingly, the first giant magnetoresistive element and thesecond giant magnetoresistive element can be disposed more closely toeach other. Furthermore, since the two elements in contact with thesingle (common) bias magnet film are electrically connected to eachother, no wire is required for connecting the two elements.

Note that, in the magnetic sensor 310 (for example, X-axis magneticsensor 311), narrow strip-shaped portions of a first giantmagnetoresistive element (for example, the conventional GMR element 316)and a second giant magnetoresistive elements (for example, the SAFelement 318) extend from a common bias magnet film (third bias magnetfilm, the bias magnet film 313) toward the same direction substantiallyperpendicular to the first direction (negative Y-axis direction, in thiscase).

Also, in the magnetic sensor 310 (for example, the X-axis magneticsensor 311), narrow strip-shaped portions of two elements of a firstgiant magnetoresistive element (for example, the conventional GMRelement 316) and a second giant magnetoresistive element (for example,the SAF element 319), extend in a line in the direction substantiallyperpendicular to the first direction (positive Y-axis direction). Inaddition, the a third bias magnet film (the bias magnetic film 312) isdisposed between the first giant magnetoresistive element (for example,the conventional GMR element 316) and the second giant magnetoresistiveelement (for example, the SAF element 319). In this instance as well, asingle bias magnet film (third bias magnet film 312) is substituted fortwo bias magnet films generally required in a conventional magneticsensor. Thus, the magnetic sensor 310 can be still smaller.

In the embodiment above, the first giant magnetoresistive elements(conventional GMR elements) of the magnetic sensor 310 is formed on theupper surface of the substrate 310 a and the second giantmagnetoresistive elements (SAF elements) are formed on the upper surfaceof the insulating layer INS. However, either of the giantmagnetoresistive elements may be disposed on the upper surface of thesubstrate 310 a. For example, in the X-axis magnetic sensor 311 shown inFIGS. 81 to 83, the conventional GMR elements 316 and 317 may bereplaced with SAF elements while the SAF elements 318 and 319 isreplaced with conventional GMR elements.

In the magnetic sensor 310 according to the present embodiment, sincethe giant magnetoresistive elements 316 to 319 forming a singlefull-bridge circuit is provided in a small area on a substrate 310 a, astress (for example, tensile stress or compressive stress) is almostuniformly placed on these elements. Therefore, since the resistances ofthe giant magnetoresistive elements evenly increase or decrease, thepossibility of losing the balance of the bridge circuit can be reduced.Thus, the magnetic sensors 310 can accurately detect external magneticfields even if a stress is placed on the giant magnetoresistiveelements.

Tenth Embodiment

A magnetic sensor according to a tenth embodiment of the presentinvention will now be described. The magnetic sensor of the tenthembodiment is different from the magnetic sensor 310 of the ninthembodiment in the following two points:

the X-axis magnetic sensor 311 of the magnetic sensor 310 is replacedwith an X-axis magnetic sensor 341 shown in FIG. 92; and

the Y-axis magnetic sensor 321 of the magnetic sensor 310 is replacedwith the same type of magnetic sensor as the X-axis magnetic sensor 341rotated counterclockwise by 90° in plan view.

Thus, the following description will illustrate the X-axis magneticsensor 341.

The X-axis magnetic sensor 341 detects the component in the X-axisdirection of an external magnetic field. The X-axis magnetic sensor 341includes 12 bias magnet films 342 a to 342 l, a pair of conventional GMRelements 343 and 344, and a pair of SAF elements 345 and 346.

The bias magnet films 342 a to 342 l each have a trapezoidal crosssection, as in the bias magnet films 312 to 315 according to the ninthembodiment. The bias magnet films 342 a to 342 l are made of the samematerial as the bias magnet films 312 to 315, and act as permanentmagnet films polarized in the positive Y-axis direction. Two bias magnetfilms 342 a and 342 g each have the same T shape as each other. Theother bias magnet films each have the same rectangular shape as eachother. The upper surfaces of the bias magnet films 342 a to 342 l lie inthe same plane.

The bias magnet film 342 a is provided in the vicinity of the positiveedge in the X-axis direction of the substrate 310 a and in the middle inthe Y-axis direction of the substrate 310 a. The bias magnet film 342 gis disposed at a third distance from the bias magnet film 342 a in thenegative X-axis direction. Four bias magnet films 342 c, 342 e, 342 i,and 342 k are disposed between those two bias magnet films 342 a and 342g.

The bias magnet film 342 c lies at a short distance from the bias magnetfilm 342 a in the negative X-axis direction. The bias magnet film 342 elies at a short distance from the bias magnet film 342 c in the negativeX-axis direction and at a short distance from the bias magnet film 342 gin the positive X-axis direction. The positive edges in the Y-axisdirection of the bias magnet films 342 c and 342 e are aligned with thepositive edges in the Y-axis direction of the bias magnet films 342 aand 342 g.

The bias magnet film 342 b is disposed at a first distance from the biasmagnet film 342 a in the positive Y-axis direction so as to oppose thebias magnet films 342 a and 342 c. The bias magnet film 342 d isdisposed at a short distance from the bias magnet film 342 b in thenegative X-axis direction so as to oppose the bias magnet films 342 cand 342 e. The bias magnet film 342 f is disposed at a short distancefrom the bias magnet film 342 d in the negative X-axis direction so asto oppose the bias magnet films 342 e and 342 g. The negative edges inthe Y-axis direction of the bias magnet films 342 b, 342 d, and 342 fare aligned in a line.

The bias magnet film 342 k is disposed at a short distance from the biasmagnet film 342 a in the negative X-axis direction. The bias magnet film342 i is disposed at a short distance from the bias magnet film 342 k inthe negative X-axis direction and at a short distance from the biasmagnet film 342 g in the positive X-axis direction. The edges in thenegative Y-axis direction of the bias magnet films 342 i and 342 k arealigned with the edges in the negative Y-axis direction of the biasmagnet films 342 a and 342 g.

The bias magnet film 342 h is disposed at the first distance from thebias magnet film 342 g in the negative Y-axis direction so as to opposethe bias magnet films 342 g and 342 i. The bias magnet film 342 j isdisposed at a short distance from the bias magnet film 342 h in thepositive X-axis direction so as to oppose the bias magnet films 342 iand 342 k. The bias magnet film 342 l is disposed at a short distancefrom the bias magnet film 342 j in the positive X-axis direction so asto oppose the bias magnet films 342 k and 342 a. The positive edges inthe Y-axis direction of the bias magnet films 342 h, 342 j, and 342 lare aligned in a line.

The conventional GMR element 343 is formed by three conventional GMRelement films 343 a to 343 c. These element films 343 a to 343 c eachhave a narrow strip shape in plan view and extend in the Y-axisdirection, as shown in FIG. 92. The middle portions of the element films343 a to 343 c are each in contact with the upper surface of thesubstrate 310 a, as in the conventional GMR element 316 of the ninthembodiment.

An end of the element film 343 a is in contact with the slant of thebias magnet film 342 a and the other end is in contact with the slant ofthe bias magnet film 342 b. An end of the element film 343 b is incontact with the slant of the bias magnet film 342 b and the other endis in contact with the slant of the bias magnet film 342 c. An end ofthe element film 343 c is in contact with the slant of the bias magnetfilm 342 c and the other end is in contact with the bias magnet film 342d. Thus, the resistance of the conventional GMR element 343 is equal toa the sum of the resistances of the element films 343 a to 343 c.

The conventional GMR element 344 is formed by three conventional GMRelement films 344 a to 344 c. These element films 344 a to 344 c eachhave a narrow strip shape in plan view and extend in the Y-axisdirection, as shown in FIG. 92. The middle portions of the element films344 a to 344 c are in contact with the upper surface of the substrate310 a, as in the conventional GMR element 316 of the ninth embodiment.

An end of the element film 344 a is in contact with the slant of thebias magnet film 342 g and the other end is in contact with the slant ofthe bias magnet film 342 h. An end of the element film 344 b is incontact with the slant of the bias magnet film 342 h and the other endis in contact with the slant of the bias magnet film 342 i. An end ofthe element film 344 c is in contact with the bias magnet film 342 i andthe other end is in contact with the bias magnet film 342 j. Thus, theresistance of the conventional GMR element 344 is equal to a sum of theresistances of the element films 344 a to 344 c.

The SAF element 345 includes three SAF element films 345 a to 345 c.These element films 345 a to 345 c each have a narrow strip-shapedportion extending in the Y-axis direction in plan view, as shown in FIG.92. The element films 345 a to 345 c are each disposed on the uppersurface of an insulating layer, as in the SAF element 318 of the ninthembodiment. The insulating layer overlies the substrate 310 a such thatthe upper surfaces of the insulating layer and the bias magnet films 342a to 342 l lie in the same plane.

An end of the element film 345 a has a slightly smaller T shape than thebias magnet film 342 g and is formed on the upper surface of the biasmagnet film 342 g. The other end of the element film 345 a ha a slightlysmaller rectangular shape than the bias magnet film 342 f and is formedon the upper surface of the bias magnet film 342 f. This other end ofthe element film 345 a is connected to an end of the element film 345 bon the upper surface of the bias magnet film 342 f. The other end of theelement film 345 b has a slightly smaller rectangular shape than thebias magnet film 342 e and is formed on the upper surface of the biasmagnet film 342 e. This other end of the element film 345 b is connectedto an end of the element film 345 c on the upper surface of the biasmagnet film 342 e. The other end of the element film 345 c has aslightly smaller rectangular shape than the bias magnet film 342 d andis formed on the upper surface of the bias magnet film 342 d. Thus, theresistance of the SAF element 345 is equal to a sum of the resistancesof the element films 345 a to 345 c.

The SAF element 346 includes three SAF element films 346 a to 346 c. Theelement films 346 a to 346 c each have a narrow strip-shaped portionextending in the Y-axis direction in plan view, as shown in FIG. 92. Theelement films 346 a to 346 c are each disposed on the upper surface ofthe insulating layer, as in the SAF element 318 of the ninth embodiment.

An end of the element film 346 a has a slightly smaller T shape than thebias magnet film 342 a and is formed on the upper surface of the biasmagnet film 342 a. The other end of the element film 346 a has aslightly smaller rectangular shape than the bias magnet film 342 l andis formed on the upper surface of the bias magnet film 342 l. This otherend of the element film 346 a is connected to an end of the element film346 b on the upper surface of the bias magnet film 342 l. The other endof the element film 346 b has a slightly smaller rectangular shape thanthe bias magnet film 342 k and is formed on the upper surface of thebias magnet film 342 k. This other end of the element film 346 b isconnected to an end of the element film 346 c on the upper surface ofthe bias magnet film 342 k. The other end of the element film 346 c hasa slightly smaller rectangular shape than the bias magnet film 342 j andis formed on the upper surface of the bias magnet film 342 j. Thus, theresistance of the SAF element 346 is equal to a sum of the resistancesof the element films 346 a to 346 c.

The X-axis magnetic sensor 341 having the above-described structure hasa full-bridge circuit as show in the equivalent circuit (the same as thefull-bridge circuit of the magnetic sensor 310) in FIG. 84A.

In the X-axis magnetic sensor 341, the element film 343 a of theconventional GMR element 343 and the element film 346 a of the SAFelement 346 receive a bias magnetic field from the same (a singlecommon) bias magnet film 342 a. The element film 343 c of theconventional GMR element 343 and the element film 345 c of the SAFelement 345 receive a bias magnetic field from the same (a singlecommon) bias magnet film 342 d. The element film 345 a of the SAFelement 345 and the element film 344 a of the conventional GMR element344 receive a bias magnetic field from the same (a single common) biasmagnet film 342 g. The element film 344 c of the conventional GMRelement 344 and the element film 346 c of the SAF element 346 receive abias magnetic field from the same (a single common) bias magnet film 342j.

Thus, in the X-axis magnetic sensor 341, a single bias magnet film issubstituted for two bias magnet films generally required in theconventional magnetic sensor, so that the conventional GMR elements andthe SAF elements are more closely disposed, as in the magnetic sensor310. Consequently, the X-axis magnetic sensor and the Y-axis magneticsensor can be miniaturized, and accordingly the magnetic sensor 341 ofthe tenth embodiment can be miniaturized.

Eleventh Embodiment

A magnetic sensor according to an eleventh embodiment of the presentinvention will now be described. The magnetic sensor of the eleventhembodiment is different from the magnetic sensor 310 of the ninthembodiment in the following two points:

the X-axis magnetic sensor 311 of the magnetic sensor 310 is replacedwith an X-axis magnetic sensor 351 shown in FIG. 93; and

the Y-axis magnetic sensor 321 of the magnetic sensor 310 is replacedwith the same type of magnetic sensor as the X-axis magnetic sensor 351rotated counterclockwise by 90° in plan view.

Thus, the following description will illustrate the X-axis magneticsensor 351.

The X-axis magnetic sensor 351 detects the component in the X-axisdirection of an external magnetic field. The X-axis magnetic sensor 351includes 12 bias magnet films 352 a to 352 l, SAF elements 353 and 355,and conventional GMR elements 354 and 356.

The bias magnet films 352 a to 352 l each have a trapezoidal crosssection, as in the bias magnet films 312 to 315 of the magnetic sensoraccording to the ninth embodiment. The bias magnet films 352 a to 352 lare made of the same material as the bias magnet films 312 to 315, andact as permanent magnet films polarized in the positive Y-axisdirection. Two bias magnet films 352 a and 352 g each have the samerectangular shape as each other, and the other bias magnet films havethe same rectangular shape as each other. The bias magnet films 352 a to352 l are disposed in the positions shown in FIG. 93. Upper surfaces ofthe bias magnet films 352 a to 352 l lie in the same plane.

The SAF element 353 includes three SAF element films 353 a to 353 c. Theelement films 353 a to 353 c each have a narrow strip-shaped portion inplan view, as shown in FIG. 93. The narrow strip-shaped portions of twoelement films 353 a and 354 c extend in a direction inclined at a smallangle θ (θ>0) with respect to the positive Y-axis direction. The narrowstrip-shaped portion of the element film 353 b extends in a directioninclined at a small angle −θ with respect to the positive Y-axisdirection. Each magnetization of the first magnetic layers P1 of theelement films 353 a to 353 c, adjoining their respective spacer layers Sis fixed in the negative X-axis direction; hence, each of themagnetic-field-detecting directions of the films 353 a to 353 c is inthe positive X-axis direction.

An end of the element film 353 a has a rectangular shape and is incontact with substantially the entire upper surface of the bias magnetfilm 352 a. The other end of the element film 353 a has a rectangularshape and is in contact with substantially the entire upper surface ofthe bias magnet film 352 b. An end of the element film 353 b isconnected to the element film 353 a on the upper surface of the biasmagnet film 352 b. The other end of the element film 353 b has arectangular shape and is in contact with substantially the entire uppersurface of the bias magnet film 352 f. An end of the element film 353 cis connected to the element film 353 b on the upper surface of the biasmagnet film 352 f. The other end of the element 353 c has a rectangularshape and is in contact with substantially the entire upper surface ofthe bias magnet film 352 d.

The conventional GMR element 354 is formed by three conventional GMRelement films 354 a to 354 c. The element films 354 a to 354 c each hasa narrow strip shape in plan view, as shown in FIG. 93. The element film354 a extends in the Y-axis direction; the element film 354 b extends ina direction inclined at a small angle −θ with respect to the positiveY-axis direction; the element film 354 c extends in a direction inclinedat a small angle θ with respect to the positive Y-axis direction. Eachmagnetization of the magnetic layers P (fixed magnetization layers P) ofthe element films 354 a to 354 c, adjoining their respective spacerlayers S is fixed in the positive X-axis direction; hence, each of themagnetic-field-detecting direction of the element films 354 a to 354 cis in the negative X-axis direction.

The conventional GMR element films 354 a to 354 c are formed so as to bein contact with the upper surface of the substrate 310 a, as in theconventional GMR element 316 of the ninth embodiment. An end of theelement film 354 a is in contact with the slant of the bias magnet film352 e, and the other end is in contact with the slant of the bias magnetfilm 352 d. An end of the element film 354 b is in contact with theslant of the bias magnet film 352 e, and the other end is in contactwith the slant of the bias magnet film 352 c. An end of the element film354 c is in contact with the slant of the bias magnet film 352 c, andthe other end is in contact with the slant of the bias magnet film 352g.

The element films 353 a to 353 c of the SAF element 353 are each formedon the upper surface of an insulating layer INS covering the substrate310 a and the conventional GMR element 354, as in the SAF element 18 ofthe ninth embodiment. Thus, the element film 353 b runs above theelement film 354 c to intersect it with the insulating layer INStherebetween, as shown in FIG. 94, which is a sectional view of theX-axis magnetic sensor 351 taken along line IV-IV in FIG. 93. Also, theelement film 353 c runs above the element film 354 b to intersect itwith the insulating layer INS therebetween.

The SAF element 355 includes three SAF element films 355 a to 355 c. Theelement films 355 a to 355 c each have a narrow strip-shaped portion inplan view, as shown in FIG. 93. The narrow strip-shaped portion of theelement film 355 a extends in the Y-axis direction; the narrowstrip-shaped portion of the element film 355 b extends in a directioninclined at a small angle θ with respect to the positive Y-axisdirection; the narrow strip-shaped portion of the element film 355 cextends in a direction inclined at a small angle −θ with respect to thepositive Y-axis direction. Each magnetization of the first magneticlayers P1 of the element films 355 a to 355 c, adjoining theirrespective spacer layers S is fixed in the negative X-axis direction;hence, each of the magnetic-field-detecting direction of the elementfilms 355 a to 355 c is in the positive X-axis direction.

An end of the element film 355 a has a rectangular shape and is incontact with substantially entire upper surface of the bias magnet film352 j. The other end of the element film 355 a has a rectangular shapeand is in contact with substantially the entire upper surface of thebias magnet film 352 i. An end of the element film 355 b is connected tothe element film 355 a on the upper surface of the bias magnet film 352i, and the other end of the element film 355 b has a rectangular shapeand is in contact with substantially the entire upper surface of thebias magnet film 352 k. An end of the element film 355 c is connected tothe element film 355 b on the upper surface of the bias magnet film 352k. The other end of the element film 355 c has a rectangular shape andis in contact with substantially the entire upper surface of the biasmagnet film 352 g.

The conventional GMR element 356 is formed by three conventional GMRelement films 356 a to 356 c. The element films 356 a to 356 c each hasa narrow strip shape in plan view, as shown in FIG. 93. The element film356 a extends in a direction inclined at a small angle −θ with respectto the positive Y-axis direction; the element film 356 b extends in adirection inclined at a small angle θ with respect to the positiveY-axis direction; the element film 356 c extends in a direction inclinedat a small angle −θ with respect to the positive Y-axis direction. Eachmagnetization of the magnetic layers P (fixed magnetization layers P) ofthe element films 356 a to 356 c, adjoining their respective spacerlayers S is fixed in the positive X-axis direction; hence, each of themagnetic-field-detecting direction of the element films 356 a to 356 cis in the negative X-axis direction.

The conventional GMR element films 356 a to 356 c are formed so as to bein contact with the upper surface of the substrate 310 a, as in theconventional GMR element 316 of the ninth embodiment. An end of theelement film 356 a is in contact with the slant of the bias magnet film352 a, and the other end is in contact with the slant of the bias magnetfilm 352 l. An end of the element film 356 b is in contact with theslant of the bias magnet film 352 l, and the other end is in contactwith the slant of the bias magnet film 352 h. An end of the element film356 c is in contact with the slant of the bias magnet film 352 h, andthe other end is in contact with the slant of the bias magnet film 352j.

The element films 355 a to 355 c of the SAF element 355 are each formedon the upper surface of the insulating layer INS covering the substrate310 a and the conventional GMR element 356, as in the SAF element 18 ofthe ninth embodiment. Thus, the element film 355 b runs above theelement film 356 c to intersect it with the insulating layer INStherebetween. Also, the element film 355 c runs above the element film356 b to intersect it with the insulating layer INS therebetween.

In the X-axis magnetic sensor 351 having the above-described structure,a pair of the conventional GMR element 354 and 356 whosemagnetic-field-detecting direction is negative X-axis direction and apair of the SAF elements 353 and 355 whose magnetic-field-detectingdirection is positive X-axis direction are connected in a full-bridgeconfiguration, as shown in the equivalent circuit in FIG. 95. A firstpotential +Vd is applied to the bias magnet film 352 a. The bias magnetfilm 352 g is grounded so that as a second potential (0 V) is applied tothe film 352 g. A potential Vout1 is extracted from the bias magnet film352 d, which is the junction where the SAF element 353 is connected tothe conventional GMR element 354, and a potential Vout2 is extractedfrom the bias magnet film 352 j, which is the junction where the SAFelement 355 is connected to the conventional GMR element 356. Thedifference between the potential Vout1 and the potential Vout2 isobtained as the output Vox of the X-axis magnetic sensor 351.

As described above, the magnetic sensor according to the eleventhembodiment comprises;

a first bias magnet film (for example, the bias magnet film 352 l)formed on the substrate 310 a so as to be in contact with an end of afirst giant magnetoresistive element (for example, the element film 356a of the conventional GMR element 356) and applying a bias magneticfield oriented in a third direction (for example, positive Y-axisdirection) substantially perpendicular to a first direction (forexample, negative X-axis direction) to the first giant magnetoresistiveelement;

a second bias magnet film (for example, the bias magnet film 352 b)formed on the substrate 310 a so as to be in contact with an end of asecond giant magnetoresistive element (for example, the element film 353a of the SAF element 353) and applying a bias magnetic field oriented inthe third direction to the second giant magnetoresistive element; and

a third bias magnet film (for example, the bias magnet film 352 a whichis a single common bias magnet film) formed on substrate 310 a so as tobe in contact with both the other end of the first giantmagnetoresistive element and the other end of the second giantmagnetoresistive element and applying a bias magnetic field oriented inthe third direction to the first giant magnetoresistive element and thesecond giant magnetoresistive element.

Furthermore, the magnetic sensor according to the eleventh embodimentcomprises;

a first bias magnet film (for example, the bias magnet film 352 e)formed on the substrate 310 a so as to be in contact with an end of afirst giant magnetoresistive element (for example, the element film 354a of the conventional GMR element 354) and applying a bias magneticfield oriented in a third direction (for example, positive Y-axisdirection) substantially perpendicular to the first direction (forexample, negative X-axis direction) to the first giant magnetoresistiveelement;

a second bias magnet film (for example, the bias magnet film 352 f)formed on the substrate 310 a so as to be in contact with an end of asecond giant magnetoresistive element (for example, the element film 353c of the SAF element 353) and applying a bias magnetic field oriented inthe third direction to the second giant magnetoresistive element; and

a third bias magnet film (for example, the bias magnet film 352 d whichis a single common bias magnet film) formed on the substrate 310 a so asto be in contact with both the other end of the first giantmagnetoresistive element and the other end of the second giantmagnetoresistive element, and applying a bias magnetic field oriented inthe third direction to the first giant magnetoresistive element and thesecond giant magnetoresistive element.

In addition, the bias magnet films 352 j and 352 g also serve as commonbias magnet films (i.e., third bias magnet films).

In the magnetic sensor according to the eleventh embodiment, as in themagnetic sensor 310, a single bias magnet film (any of the bias magnetfilms 352 a, 352 d, 352 j, and 352 g) is substituted for two bias magnetfilms, one of which is required for an end of a first giantmagnetoresistive element and the other of which is required for an endof a second giant magnetoresistive element. Accordingly, the first giantmagnetoresistive element and the second giant magnetoresistive elementcan be disposed more closely to each other.

In the magnetic sensor according to the eleventh embodiment, each of thefirst giant magnetoresistive elements (for example, the element film 354b of the conventional GMR element 354) is formed so as to be in contactwith the upper surface of the substrate 10 a, and each of the secondgiant magnetoresistive elements (for example, the element film 353 c ofthe SAF element 353) has an intersection with the first giantmagnetoresistive element when viewed from above. The first giantmagnetoresistive element and the second giant magnetoresistive elementare separated by an insulating layer INS.

This structure allows the first giant magnetoresistive element tointersect the second giant magnetoresistive element above the substratewhen viewed from above (in plan view). Thus, the first giantmagnetoresistive element and the second giant magnetoresistive elementcan be disposed more closely.

Although in the magnetic sensor of the eleventh embodiment, the firstgiant magnetoresistive elements (conventional GMR element) are formed onthe upper surface of the substrate 310 a and the second giantmagnetoresistive element (SAF element) is formed on the upper surface ofthe insulating layer INS, either of the giant magnetoresistive elementsmay be formed on the upper surface of the substrate 310 a. For example,in the X-axis magnetic sensor 351 shown in FIG. 93, the conventional GMRelements 354 and 356 may be replaced with SAF elements while the SAFelements 353 and 355 are replaced with conventional GMR elements.

Any magnetic sensor according to the embodiments disclosed above issmall and its output is affected as little as possible by stress placedon the elements. The present invention is not limited to the disclosedembodiments and various modifications can be made. For example, themagnetic sensor of the present invention may be a perpendicularbidirectional magnetic sensor, as described in some of the embodiments,or a mono-directional magnetic sensor defined by only X-axis or Y-axismagnetic sensors.

1. A method for manufacturing a magnetic sensor that comprises: a singlesubstrate; a first giant magnetoresistive element disposed on thesubstrate and formed of a single-layer-pinned spin-valve film comprisinga single-layer-pinned fixed magnetization layer including a pinninglayer and a single ferromagnetic layer, a free layer whose magnetizationdirection changes in response to an external magnetic field, and aspacer layer made of a nonmagnetic conductive material, disposed betweenthe ferromagnetic layer and the free layer, wherein the magnetization ofthe ferromagnetic layer is fixed in a first direction by the pinninglayer, so that the ferromagnetic layer serves as a pinned layer; and asecond giant magnetoresistive element disposed on the substrate andformed of a plural-layer-pinned spin-valve film comprising aplural-layer-pinned fixed magnetization layer including a firstferromagnetic layer, an exchange coupling layer adjoining the firstferromagnetic layer, a second ferromagnetic layer adjoining the exchangecoupling layer, and a pinning layer adjoining the second ferromagneticlayer, a free layer whose magnetization direction changes in response toan external magnetic field, and a spacer layer made of a nonmagneticconductive material disposed between the first ferromagnetic layer andthe free layer, wherein the magnetization direction of the secondferromagnetic layer is fixed by the pinning layer and the magnetizationdirection of the first ferromagnetic layer is fixed in a seconddirection antiparallel to the first direction by exchange coupling ofthe first ferromagnetic layer and the second ferromagnetic layer withthe exchange coupling layer therebetween, so that the firstferromagnetic layer serves as a pinned layer, the method comprising: thefilm forming step of forming a film intended to act as the first giantmagnetoresistive element and a film intended to act as the second giantmagnetoresistive element on the substrate; and the magnetic field heattreatment step of applying a magnetic field oriented in a singledirection to the films formed on the substrate at a high-temperature tofix the magnetization direction of each pinned layer.
 2. The methodaccording to claim 1, wherein the magnetic field heat treatment stepuses a magnetic field generated from a magnet array including aplurality of substantially rectangular solid permanent magnets, eachhaving a substantially square end surface perpendicular to a centralaxis of each of the permanent magnet, the permanent magnets beingarrayed at small intervals in such a manner that the barycenters of theend surfaces correspond to lattice points of a tetragonal lattice, andthat a polarity appearing on the square surface of any one of thepermanent magnets is opposite to a polarity appearing on the squaresurface of the other adjacent permanent magnets spaced by the shortestdistance.
 3. The method according to claim 1, wherein the film formingstep includes: forming on the substrate a first composite layer whichwill become one of the first giant magnetoresistive element and thesecond giant magnetoresistive element; removing an unnecessary region ofthe first composite layer; coating the first composite layer with aninsulating layer after removing the unnecessary region; forming a secondcomposite layer which will become the other film of the first giantmagnetoresistive element and the second giant magnetoresistive elementon the substrate and on the insulating layer; and removing anunnecessary region of the second composite layer.
 4. The methodaccording to claim 1, wherein the film forming step includes: forminglayers intended to act as the pinning layer, second ferromagnetic layer,and exchange coupling layer of the second giant magnetoresistive elementin this order on the substrate to form a first pre-composite layer;removing completely the layer intended to act as the exchange couplinglayer of the first pre-composite layer from a region that is to have thefirst giant magnetoresistive element without removing the firstpre-composite layer in a region that is to have the second giantmagnetoresistive element; and forming a ferromagnetic layer having thesame composition as the layer intended to act as the secondferromagnetic layer and then layers intended to act as the spacer layerand the free layer of the first giant magnetoresistive element and thesecond giant magnetoresistive element, in this order, over the entireupper surface of the layers after the step of removing the layerintended to act as the exchange coupling layer a layer.
 5. The methodaccording to claim 1, wherein the film forming step includes: forming alayer intended to act as the free layer of the first and second giantmagnetoresistive elements, a layer intended to act as the spacer layerof the first and second giant magnetoresistive elements, a layerintended to act as the first ferromagnetic layer of the second giantmagnetoresistive element, a layer intended to act as the exchangecoupling layer of the second giant magnetoresistive element, in thisorder, on the substrate to form a second pre-composite layer; removingcompletely the layer intended to act as the exchange coupling layer ofthe second pre-composite layer from a region that is to have the firstgiant magnetoresistive element without removing the second pre-compositelayer in a region that is to have the second giant magnetoresistiveelement; and forming a ferromagnetic layer having the same compositionas the layer intended to act as the first ferromagnetic layer and alayer intended to act as the pinning layer of the first and second giantmagnetoresistive elements, in this order, over the entire upper surfaceof the layers after the step of removing the layer intended to act asthe exchange coupling layer.
 6. A method for manufacturing a magneticsensor that comprises: a single substrate; a first giantmagnetoresistive element disposed on the substrate and formed of asingle-layer-pinned spin-valve film comprising a single-layer-pinnedfixed magnetization layer including a pinning layer and a singleferromagnetic layer, a free layer whose magnetization direction changesin response to an external magnetic field, and a spacer layer made of anonmagnetic conductive material, disposed between the ferromagneticlayer and the free layer, wherein the magnetization of the ferromagneticlayer is fixed in a first direction by the pinning layer, so that theferromagnetic layer serves as a pinned layer; and a second giantmagnetoresistive element disposed on the substrate so as to overlie orunderlie the first giant magnetoresistive element, formed of aplural-layer-pinned spin-valve film comprising a plural-layer-pinnedfixed magnetization layer including a first ferromagnetic layer, anexchange coupling layer adjoining the first ferromagnetic layer, asecond ferromagnetic layer adjoining the exchange coupling layer, and apinning layer adjoining the second ferromagnetic layer, a free layerwhose magnetization direction changes in response to an externalmagnetic field, and a spacer layer made of a nonmagnetic conductivematerial disposed between the first ferromagnetic layer and the freelayer, wherein the magnetization direction of the second ferromagneticlayer is fixed by the pinning layer and the magnetization direction ofthe first ferromagnetic layer is fixed in a second directionantiparallel to the first direction by exchange coupling of the firstferromagnetic layer and the second ferromagnetic layer with the exchangecoupling layer therebetween, so that the first ferromagnetic layerserves as a pinned layer, the method comprising: the film forming stepof forming a film intended to act as the first giant magnetoresistiveelement and a film intended to act as the second giant magnetoresistiveelement on the substrate such that one of the films overlies the otherfilm; and the magnetic field heat treatment step of applying a magneticfield oriented in a single direction to the films at a high-temperatureto fix the magnetization direction of each pinned layer.
 7. The methodaccording to claim 6, wherein the magnetic field heat treatment uses amagnetic field generated from a magnet array including a plurality ofsubstantially rectangular solid permanent magnets, each having asubstantially square end surface perpendicular to a central axis of eachof the permanent magnet, the permanent magnets being arrayed at smallintervals in such a manner that the barycenters of the end surfacescorrespond to lattice points of a tetragonal lattice, and that apolarity appearing on the square surface of any one of the permanentmagnets is opposite to a polarity appearing on the square surface of theother adjacent permanent magnets spaced by the shortest distance.
 8. Themethod according to claim 6, wherein the film forming step includes:forming on the substrate a first composite layer which will become oneof the first giant magnetoresistive element and the second giantmagnetoresistive element; removing an unnecessary region of the firstcomposite layer; coating the first composite layer with an insulatinglayer after removing the unnecessary region; forming a second compositelayer which will become the other film of the first giantmagnetoresistive element and the second giant magnetoresistive elementon the insulating layer; and removing an unnecessary region of thesecond composite layer.
 9. A method for manufacturing a magnetic sensor,the magnetic sensor comprising: a single substrate; a first giantmagnetoresistive element disposed on the substrate, the first giantmagnetoresistive element being formed of a single-layer-pinnedspin-valve film comprising a single-layer-pinned fixed magnetizationlayer which includes a pinning layer and a single ferromagnetic layer, afree layer whose magnetization direction changes in response to anexternal magnetic field, and a spacer layer made of a nonmagneticconductive material which is disposed between the ferromagnetic layerand the free layer, wherein the magnetization of the ferromagnetic layeris fixed in a first direction by the pinning layer, so that theferromagnetic layer serves as a pinned layer; a second giantmagnetoresistive element disposed close to the first giantmagnetoresistive element on the substrate, the second giantmagnetoresistive element being formed of a plural-layer-pinnedspin-valve film comprising a plural-layer-pinned fixed magnetizationlayer which includes a first ferromagnetic layer, an exchange couplinglayer adjoining the first ferromagnetic layer, a second ferromagneticlayer adjoining the exchange coupling layer, and a pinning layeradjoining the second ferromagnetic layer, a free layer whosemagnetization direction changes in response to an external magneticfield, and a spacer layer made of a nonmagnetic conductive materialwhich is disposed between the first ferromagnetic layer and the freelayer, wherein the magnetization direction of the second ferromagneticlayer is fixed by the pinning layer and the magnetization direction ofthe first ferromagnetic layer is fixed in a second directionantiparallel to the first direction by exchange coupling of the firstferromagnetic layer and the second ferromagnetic layer with the exchangecoupling layer therebetween, so that the first ferromagnetic layerserves as a pinned layer; a first bias magnet film disposed on thesubstrate so as to be in contact with an end of the first giantmagnetoresistive element, the first bias magnet film applying a biasmagnetic field oriented in a third direction substantially perpendicularto the first direction to the first giant magnetoresistive element; asecond bias magnet film disposed on the substrate so as to be in contactwith an end of the second giant magnetoresistive element, the secondbias magnet film applying a bias magnetic field oriented in the thirddirection to the second giant magnetoresistive element; and a third biasmagnet film disposed on the substrate so as to be in contact with boththe other end of the first giant magnetoresistive element and the otherend of the second giant magnetoresistive element, the third bias magnetfilm applying a bias magnetic field oriented in the third direction tothe first giant magnetoresistive element and the second giantmagnetoresistive element; the method comprising: preparing the singlesubstrate; forming films intended to act as the first to third biasmagnet films on the substrate; forming a first film intended to act asone of the first giant magnetoresistive element and the second giantmagnetoresistive element on the upper surface of the substrate and theupper surfaces of the first to third bias magnet films; forming aninsulating layer to cover the upper surfaces of the films intended toact as the bias magnet films and the first film; planarizing the uppersurfaces of the insulating layer, the films intended to act as the biasmagnet films, and the first film by partially removing the insulatinglayer, the films intended to act as the bias magnet films, and the firstfilm so that the upper surfaces of the films intended to act as the biasmagnet film are exposed; forming a second film intended to act as theother of the first giant magnetoresistive element and the second giantmagnetoresistive element on the planarized surface; and performing amagnetic field heat treatment by applying a magnetic field oriented in asingle direction to the first film and the second film at a hightemperature, thereby fixing the magnetization directions of the pinnedlayers.
 10. The method according to claim 9, wherein the step of formingfilms intended to act as the first to third bias magnet films on thesubstrate includes forming these films in such a manner that each ofthese films has at least a slant with respect to the surface of thesubstrate.
 11. The method according to claim 9, wherein the step ofperforming the magnetic field heat treatment uses a magnetic fieldgenerated from a magnet array including a plurality of substantiallyrectangular solid permanent magnets, each having a substantially squareend surface perpendicular to a central axis of each of the permanentmagnet, the permanent magnets being arrayed at small intervals in such amanner that the barycenters of the end surfaces correspond to latticepoints of a tetragonal lattice, and that a polarity appearing on thesquare surface of any one of the permanent magnets is opposite to apolarity appearing on the square surface of the other adjacent permanentmagnets spaced by the shortest distance.